There are no clear criteria for separating messages according to the log level.
So some crates log every byte in info level, while other more conveniently move such info to trace level.
As example, in my project I have such config for env_logger:
It make possible to construct via builder pattern, plus you can construct filter from RUST_LOG via let filter = android_logger::FilterBuilder::from_env("RUST_LOG").build();
There are no clear criteria for separating messages according to the log level. So some crates log every byte in
info
level, while other more conveniently move such info totrace
level. As example, in my project I have such config forenv_logger
:So it would be nice if it is possible at least filter messages before send them to syslog via crate names.
One of possible variants of solution would be generalize solution from android_logger: https://docs.rs/android_logger/0.11.1/android_logger/struct.FilterBuilder.html
It make possible to construct via builder pattern, plus you can construct filter from
RUST_LOG
vialet filter = android_logger::FilterBuilder::from_env("RUST_LOG").build();