The most opinionated logger you'll find.
Does nothing if RUST_LOG
is set.
cargo add log
cargo add zarthus_env_logger
#[macro_use]
extern crate log;
fn main() {
zarthus_env_logger::init();
info!("Hello, world!");
}
- Absolutely nothing if
RUST_LOG
is set. - The name of the package is shortened (to
@
) - Log filters to
debug
by default for your own package, anderror
for all other packages. - Timestamps are handled with
chrono
ortime
(if possible), and included by default - Opinionated colouring
Licensed under the following licenses at your option:
- Apache License, Version 2.0 <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>
- MIT license <LICENSE-MIT or https://opensource.org/licenses/MIT>
Files in the project may not be copied, modified, or distributed except according to those terms.