Is there a way in Nlog to output certain character only if Exception is not null. For example my layout is:
layout="${longdate}|${callsite:skipFrames=1}|${message}|${exception:format=tostring}"
If I call NLog.Debug("Hello")
the output will be:
2015-12-07 11:50:00.5114|MyDll.MyClass.MyMethod|Hello|
That last character |
is being printed out. Is there a way to prevent this, and only print it out if there is an actual exception being printed?