Skip to content

Latest commit

 

History

History
 
 

NLog.OutputDebugString

NLog OutputDebugString Target

NLog OutputDebugString Target writes to the OutputDebugString Win32 API, which can be monitored using debugger tools like DebugView.

If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog

See the NLog Wiki for available options and examples.

Register Extension

NLog will only recognize type-alias OutputDebugString when loading from NLog.config-file, if having added extension to NLog.config-file:

<extensions>
    <add assembly="NLog.OutputDebugString"/>
</extensions>

Alternative register from code using fluent configuration API:

LogManager.Setup().SetupExtensions(ext => {
   ext.RegisterTarget<NLog.Targets.OutputDebugStringTarget>();
});