logging - Which is the best viewer for NLog? -


which best viewer nlog?

log2console

sentinel

other ?

although old question, same question has been haunting me last couple of weeks. here little contribution hive-mind:

i found lightweight client or client/server application using simplistic, lightweight log viewer log2console nlogviewer target' filled additional parameters fields made both easy use/setup , customize, while being readable , easy find info looked for.

i used udp listener in log viewer, , following target definition in 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; tab, helps make bit more readable.
  2. the &#13;&#10; newline, since couldn't use ${newline} in layout renderer's parameter (an nlog limitation).
  3. in example use detailed layout, can of course edit like, use $exception layout renderer doc page reference.

hope finds helpful


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -