Which is the best viewer for NLog?
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
I quite like Log4View:
http://www.log4view.com/log4view/
(It is a commercial tool, though. I think they should pay me for making advertisement for them, but sadly they do not...)
Please check out nlogcruncher very simple to use and free.
<target name="network" xsi:type="Network" address="udp://127.0.0.2:4000"
layout="${date:format=HH\:MM\:ss.fff} | ${logger} | ${level} | ${message}"/>
There is also NLog Viewer but it only as a trial.
© 2022 - 2024 — McMap. All rights reserved.