-
Notifications
You must be signed in to change notification settings - Fork 1.4k
OutputDebugString target
Rolf Kristensen edited this page May 13, 2022
·
19 revisions
Outputs log messages through the OutputDebugString Win32 API. That can be monitored using DebugView or Harvester
Platforms Supported: Limited - Requires Windows and since NLog 5.0 then also nuget-package NLog.OutputDebugString
<targets>
<target xsi:type="OutputDebugString" name="String" layout="Layout" />
</targets>
Read more about using the Configuration File.
- name - Name of the target.
-
layout - Layout used to format log messages. Required. Default:
${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true}
-
header - Layout used to format header-output when initializing. Layout
Introduced with NLog 5.0
-
footer - Layout used to format footer-output when closing. Layout
Introduced with NLog 5.0
Alternative targets for diagnostic output:
-
Trace-target for output to
System.Diagnostics.Trace
-
DebugSystem-target for output to
System.Diagnostics.Debug
-
Debugger-target for output to
System.Diagnostics.Debugger.Log
- Troubleshooting Guide - See available NLog Targets and Layouts: https://nlog-project.org/config
- Getting started
- How to use structured logging
- Troubleshooting
- FAQ
- Articles about NLog
-
All targets, layouts and layout renderers
Popular: - Using NLog with NLog.config
- Using NLog with appsettings.json