I want to override default trace listener to route trace information to syslog server.
I am using Kiwi Syslog server. For now, I am sending message to syslog server using nuget library SyslogNet.Client 0.2.3.
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 message to syslog server I want to override listener to send the message directly to syslog using Trace Info or error.
Basically my need is I want a listener which will listen to Trace info and If anything comes in trace info it should write into syslog.