emertechie / SyslogNet

.Net Syslog client. Supports both RFC 3164 and RFC 5424 Syslog standards as well as UDP and encrypted TCP transports.
MIT License
77 stars 49 forks source link

How can I determine if sending a syslog message was a success or a failure? #37

Open dca00 opened 3 years ago

dca00 commented 3 years ago

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?

ststeiger commented 3 years ago

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.