Writes log messages to the attached managed debugger. See also System.Diagnostics.Debugger.Log
Supported in .NET, Silverlight and Mono
<targets>
<target xsi:type="Debugger"
name="String"
footer="Layout"
layout="Layout"
header="Layout" />
</targets>
Read more about using the [[Configuration File]].
- name - Name of the target.
- footer - Footer. Layout
- layout - Text to be rendered. Layout Required. Default:
${longdate}|${level:uppercase=true}|${logger}|${message}
- header - Header. Layout
- OptimizeBufferReuse - Reduce logging overhead, by allowing buffer reuse. Default:
True
Introduced with NLog v4.4.2. Default became
True
with NLog v4.5
From stackoverflow
<targets>
<target name="debugger" xsi:type="Debugger" layout="${logger}::${message}"/>
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="debugger" />
</rules>