Skip to content
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

Integrate Syslog Appender #380

Open
bconn98 opened this issue Jul 13, 2024 · 3 comments
Open

Integrate Syslog Appender #380

bconn98 opened this issue Jul 13, 2024 · 3 comments

Comments

@bconn98
Copy link
Collaborator

bconn98 commented Jul 13, 2024

As brought up a couple times in the past #18 #26, there is a desire to use log4rs while writing to syslog. This capability could be utilized by applications running in Kubernetes in conjunction with ELK Stack. This issue can act as a sounding board / design approval for introduction of a new and complex appender that has alluded this crate for 8 years.

@bconn98
Copy link
Collaborator Author

bconn98 commented Jul 13, 2024

Previous discussions in #18 brought forth the following suggestions.

  • Base the implementation on Syslog appender #26
  • Copy or call the implementation from the MIT licensed rust-syslog crate (relevant code probably less than 500 LOC)?
  • Re-implement syslog
  • Create a RELP crate and utilize it here

@bconn98
Copy link
Collaborator Author

bconn98 commented Jul 13, 2024

It looks like version 6+ of rust-syslog has added integration with the log crate. This should help with integrating their solution I'm hoping. Further investigation is needed.

@bconn98
Copy link
Collaborator Author

bconn98 commented Aug 3, 2024

After some further investigation into the rust-syslog project and considering how we can use their API. My gut feeling is that we should wrap their tool within the log4rs baseline. This reduces duplicate code & empowers us to take updates as both projects grow. We would of course need to add configuration capabilities as well.

  1. Syslog Appender is a wrapper around rust-syslog
  2. Config - new work
  3. Encode - Similar to JSON, I purpose an extremely limited configuration interface
  4. Filter - Limit to just the Rust log library supported log levels. Do not support critical, alert, or emergency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant