Rob Smyth

Monday, 20 September 2010

Using Log2Console from NLog via MSMQ

I've been using Log2Console to view real-time logging for a while using the Chainsaw target and UDP. But UDP is not reliable for fast real time logging. I found a simple way to configure NLog to send messages via MSMQ in the Log4JXml format used by Log2Console. It recon this could be used with any NLog target.

Here is the NLog config:

<target name="messageQueue" xsi:type="MSMQ" queue=".\private$\log">
<layout xsi:type="Log4JXmlEventLayout"/>

So simple.