NLog and Prosa.LogAppender.dll

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NLog and Prosa.LogAppender.dll

Dick de Reus
How can I configure NLog to send messages to log4view (fantastic product by the way) using the Prosa.LogAppender.dll?

When I was using log4net I could just use the address or localhost of the server on the server (website). Then I would use log4view to 'listen' to any server that was generating logs.

Now I understand that, using NLog, I have to use UDP and then I have to put in the address of the machine running log4view on all servers.

Is this correct?

rgds
Reply | Threaded
Open this post in threaded view
|

Re: NLog and Prosa.LogAppender.dll

Philipp Lauchner
Administrator
Dear Dick,

please excuse my delayed answer. To use NLog you do not need the Prosa LogAppender. You need our appender only when using log4net and TCP.

For example, if you want to use Log4View and Nlog via TCP, you add the following to your logging application's config:

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <targets async="true">
    <target name="network" xsi:type="Network" address="tcp4://localhost:9133" layout="${log4jxmlevent}" newline="True"/>
  </targets>

  <rules>
    <logger name="*" minlevel="Debug" writeTo="network"/>
  </rules>
</nlog>

And in Log4View you add a network receiver of type "TCP Server" with port 9133.

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: NLog and Prosa.LogAppender.dll

Anthony Brenelière
It does not work with appender type "Network". Use "NLogViewer" instead.

It does not either work with host names like "localhost". Use IP address like "127.0.0.1" instead.


<target xsi:type="NLogViewer" name="udpnetwork" layout="${log4jxmlevent}" address="udp://127.0.0.1:878" />