-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP syslog example #76
Comments
after more testing, I arrived at: let mut logger = syslog::udp(formatter, "127.0.0.1:1234", "10.0.0.10:514").expect("failed to initialize syslog");
logger.alert("zpe-fixer logging initializing").expect("failed to send syslog message"); However this panics with:
|
When using Initially I stumbled upon this SO post, it seemed like
Turns out that
So I tried connecting to a localhost and LAN UDP syslog server with that format, it worked both times:
(...)
It also worked with the IPv6 equivalent, |
I am currently trying to use the syslog crate to send messages to a remote syslog server over UDP.
My current instantiation is:
syslog::udp(Formatter3164::default(), UnixStream::connect("/dev/log")?, (syslog_ip,514 as u16));
but this is failing because apparently local and server need to be the same type?Is there any example code that could be provided on how one uses this to connect to a remote syslog server?
The text was updated successfully, but these errors were encountered: