SyslogNet
SyslogNet copied to clipboard
How can I determine if sending a syslog message was a success or a failure?
When I send to a host where syslog daemon is not even running, the .Send() method does not throw any exceptions. It takes a tad bit longer than if the daemon is running there, but the difference is not significant enough to use it as an indicator. So, how can I determine if syslog daemon is listening or not?
The default-syslog method is UDP. UDP is connectionless - so there is not feedback. You need to use either TCP or SSL/TLS. Then you get an error if the server is not listening or did not not receive your message.