also check logging environment variable

This commit is contained in:
Johann150 2021-02-05 08:43:07 +01:00
parent 86e0fe665d
commit 055dceeece
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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(