estk / log4rs

A highly configurable logging framework for Rust
Apache License 2.0
1.01k stars 149 forks source link

Integrate Syslog Appender #380

Open bconn98 opened 4 months ago

bconn98 commented 4 months ago

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 commented 4 months ago

Previous discussions in #18 brought forth the following suggestions.

bconn98 commented 4 months ago

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 commented 3 months ago

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.