diff --git a/README.md b/README.md index ce1df89..96beadf 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,14 @@ LICENSE:text/plain;charset=UTF-8 gone.gmi:52 This file is no longer here, sorry. ``` +### Logging Verbosity + +Agate uses the `env_logger` crate and allows you to set the logging verbosity by setting the default `RUST_LOG` environment variable. For more information, please see the [documentation of `env_logger`]. + [Gemini]: https://gemini.circumlunar.space/ [Rust]: https://www.rust-lang.org/ [home]: gemini://gem.limpet.net/agate/ [rustup]: https://www.rust-lang.org/tools/install [source]: https://github.com/mbrubeck/agate [crates.io]: https://crates.io/crates/agate +[documentation of `env_logger`]: https://docs.rs/env_logger/0.8 diff --git a/src/main.rs b/src/main.rs index 0a6f019..2f26b7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,10 @@ use { fn main() -> Result { if !ARGS.silent { - env_logger::Builder::new().parse_filters("info").init(); + env_logger::Builder::new() + .filter_level(log::LevelFilter::Info) + .parse_default_env() + .init(); } Runtime::new()?.block_on(async { let mimetypes = Arc::new(Mutex::new(FileOptions::new(PresetMeta::Parameters(