This sample connects to a Syslog server, sends a message and disconnects.

The sample is a console utility that connects to the specified Syslog server using the specified transport protocol, sends the specified message and disconnects.

For easier testing, the sample optionally skips certificate validation by accepting all TLS certificates. Please note that this should not be done in production code.


> SyslogClient TCP localhost:514 "Hello World!"
> SyslogClient TLS localhost:6514 "Hello World!" -acceptAll


// create Syslog client instance
using (var client = new SyslogClient())
    // connect to desired Syslog server
    client.Connect(hostname, port, SyslogTransportProtocol.Tcp);

    // send a message
    client.Send("Hello from Rebex Syslog client.");