powershell async issue with network responder.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

powershell async issue with network responder.

If I create a logger in powershell and send out some messages and then create another logger and try to send out messages on the second logger i get the following error.

2012-01-29 23:32:40.8336 Error Exception in asynchronous handler NLog.NLogRuntimeException: Exception occurred in NLog ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at NLog.Internal.NetworkSenders.UdpNetworkSender.DoSend(Byte[] bytes, Int32 offset, Int32 length, AsyncContinuation asyncContinuation)

Flat file works, network logger does not.
Target text below.  

<target name="network" xsi:type="Network"
  layout="${log4jxmlevent:includeCallSite=true:includeNLogData=true}" />

Strange enough if I create the two loggers before  sending any items to any of the logger everything is fine.

 any thoughts?