I'm trying to figure out how to stop NLog from replacing the Newlines in the strings I'm logging. I want the output to include all the line breaks and not place the entire output onto one line.
Can anybody help?
Config:
<?xml version="1.0" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="udp" xsi:type="NLogViewer" address="udp4://192.168.0.101:7071" />
</targets>
<rules>
<logger name="*" minlevel="Trace" writeTo="udp" />
</rules>
</nlog>
Code:
var logger = LogManager.GetLogger($"Test");
var dumpStr = builder.ToString();
logger.Info(dumpStr);