Need help

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help

ashwin
Hi,

We have one centralize logging server which is a Linux box (we will call it server A) .  There is one application which is hosted on Microsoft.Net server (We will call it B).  We want to send the logs from B to A using NLog Framework.

What are the steps we need to follow ? Please advise.

Thank you,
Ashwin.
Reply | Threaded
Open this post in threaded view
|

Re: Need help

Jason LaFlair
Administrator
I guess the first step before really doing anything else is to identify 'how' you are going to 'log' to the linux server?  File based, web, network api?  Could you further explain your "centralize logging server" for us?

Once we know what we are logging to (protocol and payload), we can start looking at how to work an NLog config into the equation.
Reply | Threaded
Open this post in threaded view
|

Re: Need help

ashwin
Thanks for your response.

Logface 3.1 software is installed on the linux box. Below is the vendor link.

http://www.moonlit-software.com/logfaces/web/index.php

I attached the design doc with this reply for more information.

Best Regards,
Ashwin.

Current_logFaces.vsd
Reply | Threaded
Open this post in threaded view
|

Re: Need help

Jason LaFlair
Administrator
Well... I guess the mantra is correct RTFM :)

Page 8 of their Manual -

2.5.4 NLog configuration

If your system is .Net based and using NLog logging platform, you can use either TCP or UDP or
even both of them depending on your needs. Here is the configuration sample :

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="console" xsi:type="Console" />
<target name="logfile" xsi:type="File" fileName="file.txt" />
<target name="lfs-tcp" xsi:type="Network" address="tcp://localhost:55200" />
layout="${log4jxmlevent:includeMdc=true:appInfo=MYAPP}"
<target name="lfs-udp" xsi:type="Network" address="udp://localhost:55201" />
layout="${log4jxmlevent:includeMdc=true:appInfo=MYAPP}"
</targets>
<rules>
<logger name="com.package1.*" minlevel="Error" writeTo="lfs-tcp" />
<logger name="com.package2.*" minlevel="Trace" writeTo="lfs-udp" />
</rules>
</nlog>

Note how we use 'appInfo' attribute to identify your application name, and 'includeMDC' to make
sure mapped diagnostic context is transmitted to the server (optional).