Which is the best viewer for NLog?
log2console
sentinel
Other?
Although a very old question, the same question has been haunting me this last couple of weeks. Here is my little contribution to the hive-mind:
I found that for a lightweight client or client/server application using a simplistic, lightweight log viewer like log2console with NLogViewer target' filled with additional parameters fields made it both easy to use/setup and customize, while being readable and easy to find the info I looked for.
I used a UDP listener in the log viewer, and the following target definition in my NLog configuration:
<target xsi:type="NLogViewer" name="logviewer" address="udp://localhost:7071" onOverflow="Split"> <parameter name="Message		" layout="${message}" /> <parameter name="Callsite		" layout="${callsite:includSourcePath=true}"/> <parameter name="Exception	" layout="${exception:separator= ---- :innerExceptionSeparator= -- -- -- -- -- :maxInnerExceptionLevel=5:format=Message,Type,StackTrace:innerFormat=Message,Type,StackTrace}" /> <parameter name="StackTrace	" layout="${newline}	${stacktrace_custom}" /> </target>
Notes:
	
is tab, which helps make it a bit more readable.
is newline, since I couldn't use ${newline} in a layout renderer's parameter (an NLog limitation).Hope someone finds this helpful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With