Quantcast

How to send stacktrace of exceptions to Chainsaw or Log2Console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to send stacktrace of exceptions to Chainsaw or Log2Console

themarcus
hi there!

wow! NLog is great!

im playing around with Log2Console and Chainsaw. Everything works fine but i cant figure out how to tell my lovely NLog framework to sent also exception statcktrace to them. The layout parameter does not work and i get exceptions.
has anyone done this yet?

Marcus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to send stacktrace of exceptions to Chainsaw or Log2Console

olle
I'm having the exact same problem, have you found a solution?

It would be really nice to get the exceptions to Log2Console. Or is there another similar tool that we can use instead om Log2Console?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to send stacktrace of exceptions to Chainsaw or Log2Console

Baronics
I do it by setting a second Target just for exceptions:

    <target name="viewer" xsi:type="NLogViewer" address="udp4://localhost:7001" />
    <target name="viewer2" xsi:type="Network" layout="${exception:format=ToString}" address="udp4://localhost:7002" />

For the exceptions, Log2Console complains "The Log Event is not a valid log4j Xml block", but it shows up in the details pane.
Make sure to set up Log2Console for 2 receivers.

Loading...