Which is the best viewer for NLog? [closed]
Asked Answered
L

3

34

Which is the best viewer for NLog?

log2console

sentinel

Other?

Lagging answered 30/6, 2011 at 18:24 Comment(5)
the best seems like a subjective metric.Centner
I like insightextensions.codeplex.com much better then those list in your question.Pelagias
@Pelagias ... is commercial, you should note that. log2console and sentinel are free.Fogbow
@Fogbow - and your point is? If you want free go for it. ReflectInsight is a more superior product in terms of speed, what it can log in structured format, distributed logging and live logging that can be up and running for years with a minimal memory footprint. The other viewers that where mention are ok for debugging during development but they don't come anywhere close to being enterprise ready, especially in production environments.Pelagias
Try my solution. I decided to develop this program, because log2console constantly hung up when it received a lot of logs. P.S. LogViewer works only over UDP.Ticktock
I
15

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&#9;&#9;" layout="${message}" />
    <parameter name="Callsite&#9;&#9;" layout="${callsite:includSourcePath=true}"/>
    <parameter name="Exception&#9;" layout="${exception:separator=&#13;&#10;----&#13;&#10;:innerExceptionSeparator=&#13;&#10;-- -- -- -- --&#13;&#10;:maxInnerExceptionLevel=5:format=Message,Type,StackTrace:innerFormat=Message,Type,StackTrace}" />
    <parameter name="StackTrace&#9;" layout="${newline}&#9;${stacktrace_custom}" />
</target>

Notes:

  1. The &#9; is tab, which helps make it a bit more readable.
  2. The &#13;&#10; is newline, since I couldn't use ${newline} in a layout renderer's parameter (an NLog limitation).
  3. In my example I use a very detailed layout, you can of course edit it however you like, use the $exception layout renderer doc page for reference.

Hope someone finds this helpful

Ignatz answered 13/3, 2012 at 12:43 Comment(2)
Log2Console now supports NLog explicitly. See instructionsScuta
I had to use udp4:// to get it to work, and the more basic configuration suggested by @JaredBeach.Rustic
S
13

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...)

Supporter answered 13/3, 2012 at 13:24 Comment(1)
The community edition is free and seems to be quite good. Thanks!Copywriter
S
1

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.

Selfconfidence answered 1/7, 2011 at 12:59 Comment(3)
Can you get exception and stacktrace information here? I am struggling with Sentinel and Log2Console apps, can only get the message part through.Mossbunker
Just use the following layout to get exception and stack trace. layout="${longdate} ${message} ${exception:format=tostring}"Selfconfidence
It's looking like this isn't working for me any longer on Windows 10 - latest. Any ideas if this is still supported or working?Jemima

© 2022 - 2024 — McMap. All rights reserved.