Geal / rust-syslog

Send syslog messages from Rust
MIT License
110 stars 55 forks source link

Adding ability to filter logging with environmental variables. #13

Closed stusmall closed 7 years ago

stusmall commented 8 years ago

I'm working on a project and really wanted the ability to filter logging without a re-compile that env_logger provides but also wanted to syslog. I've pulled their filtering code over so I can have the best of both worlds. If the RUST_LOG env isn't set it should affect how the library works.

stusmall commented 8 years ago

@Geal I just wanted to know if you had a chance to look at this yet.

Geal commented 8 years ago

I am not sure adding this functionality would be the right fit for the syslog crate. I think it is more suited as a backend for other logging libraries, like for slog: https://github.com/dpc/slog-rs/tree/master/crates/syslog

But I agree with you, it's annoying to have features in separate, incompatible crates. Maybe some kind of logging middleware could be useful?