This project has moved. For the latest updates, please go here.

Add NLog example to the Receivers


After a lot of searching I found out that Log2Console needs the Chainsaw Target in NLog, and the TCP/IP one that the receivers dialog shows doesn't work (atleast for ASP.NET apps).

Could you add an NLog example to the UDP receiver example, below the log4net example?

<target name="n1" xsi:type="Chainsaw" address="udp://" />
<logger name="*" minlevel="Info" writeTo="n1" />
Also make sure people know it has to be an IP address, as localhost won't work.


Kiwawa wrote Sep 24, 2013 at 1:51 PM

Me too!

The only combination I got NLog working over network was using Chainsaw (not mentioned in any documentation), using TCP (not sure why UDP barfs), and with IP instead of "localhost", which is very strange since they should be completely equivalent.

wrote Feb 13, 2015 at 7:31 PM

WouterSF wrote Dec 2, 2015 at 10:36 AM

For me it also works fine with the following target:
    <target name="udp" xsi:type="Network" address="udp4://"
            layout="${log4jxmlevent}" />
What does not work for log2console 1.6 and higher is the exceptions. They won't log into the Exceptions tab.