-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Logging to syslog #18
Comments
I don't know of anything that will currently hit syslog, but it should be easy to make. I think it'd probably make sense to build in a 3rd party crate for now - we can always merge it in later. |
I've implemented the base functionality of the syslog appender. It supports plain and RFC 5424 messages and UDP/TCP protocols for now but can be easily extended by providing the RFC 3164 format support and unix sockets as a transport protocol option. I'll get back to these features shortly. Any feedback on the code as well as on the documentation will be highly appreciated. |
RFC 3164 support is ready. Added to the same PR. |
I've made appender based on libc's syslog() function: https://crates.io/crates/log4rs-syslog. It supports only linux and other unix-like systems (tested on macOS). Maybe someone will find it useful. |
@im-0 If you're interested in merging log4rs-syslog into log4rs I'd be interested in helping with the effort. (Obviously behind a feature flag) |
It seems that there is no respond from log4rs-syslog , could you add syslog support directly into this crate? @estk |
@zonyitoo I'd love to have that functionality, but i dont have time to implement it personally. if youd like to submit a PR i would be happy to assist. |
Would you mind copy-and-paste log4rs-syslog? I works well with 0.13. If it is ok, I could make a PR like that. But it would be better to ask @im-0 again. |
Any updates on getting syslog functionality to log4rs since the last post 3 year ago? It seems was an implementation in #26 ~8 years ago, but then that never got merged because there "had to be a better way" than to duplicate the code from rust-syslog. What would be the best way to implement a cross platform network syslog backend for log4rs?
PS: Any ideas about supporting RELP? |
@kwinz I'd be interested in merging log4rs-syslog in. Do you see a better way to do it with option 2 by using rust-syslog? I think we should start with syslog and then move to support RELP with a similar model. |
In your docs, you write:
Are there any docs on how to actually log to syslog? Is a custom appender required for that? Could a syslog appender be included in the crate or in a 3rd party crate?
The text was updated successfully, but these errors were encountered: