summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-03-09 19:45:24 +0200
committerLars Wirzenius <liw@liw.fi>2024-03-09 19:45:24 +0200
commitc2e63bea1df8f5afc7bcad7e1bf7f7ead0883c51 (patch)
tree6e2672b577d7013b21ebe4b1a25672248c13ce3a
parentb9d2ef842ce2321836bc22cddbfbc4a159cf4a5f (diff)
downloadambient-driver-c2e63bea1df8f5afc7bcad7e1bf7f7ead0883c51.tar.gz
feat: set a default log level
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--src/bin/ambient-driver.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bin/ambient-driver.rs b/src/bin/ambient-driver.rs
index 0c90424..534157d 100644
--- a/src/bin/ambient-driver.rs
+++ b/src/bin/ambient-driver.rs
@@ -19,7 +19,11 @@ fn main() {
}
fn fallible_main() -> anyhow::Result<()> {
- pretty_env_logger::init_custom_env("AMBIENT_LOG");
+ let mut builder = pretty_env_logger::formatted_builder();
+ builder.filter_level(log::LevelFilter::Info);
+ builder.parse_env("AMBIENT_LOG");
+ builder.init();
+
info!("ambient-driver starts");
let args = Args::parse();
let config = EffectiveConfig::try_from(&args)?;