How do I redirect trace information to syslog?

I want to override the default trace listener to route trace information to a syslog server.

I am using Kiwi Syslog server. At the moment I am posting to the syslog server using the nuget SyslogNet.Client 0.2.3 library.

var _syslogSender = new SyslogUdpSender("localhost", 514);
                _syslogSender.Send(
                    new SyslogMessage(
                        DateTime.Now,
                        Facility.SecurityOrAuthorizationMessages1,
                        Severity.Informational,
                        Environment.MachineName,
                        "Application Name",
                        "Message Content"),
                    new SyslogRfc5424MessageSerializer());

      

Instead of sending a message to the syslog server, I want to override the listener to send the message directly to syslog using trace information or error.

Basically, I want a listener to listen for trace information, and if something comes in trace information, it should be written to syslog.

+3
.net logging system.diagnostics trace syslog


source to share


No one has answered this question yet

Check out similar questions:

3575
How to list a transfer?
2058
How do I get a consistent byte representation of strings in C # without manually specifying the encoding?
1877
What is a NullReferenceException and how do I fix it?
1742
How to calculate a person's age in C #?
706
How to display shell commands as they run
8
Getting a UDP socket program in Python to receive messages from a Syslog client?
0
How to decrypt traffic from syslog-ng to syslog
0
Log4j SyslogAppender not sending logs to local Syslog
0
How to send message to remote syslog using syslog.h
0
How to register in .Net application for Kiwi Syslog, how to set priority?



All Articles
Loading...
X
Show
Funny
Dev
Pics