From 4f1b17b939a30c9604c3c624a326d2ad298e2098 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Mon, 15 Jan 2024 00:41:29 +0000 Subject: [PATCH] Fix missing logs when no RUST_LOG env var is given --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3792da1..ee61a4c 100644 --- a/src/main.rs +++ a/src/main.rs @@ -109,6 +109,10 @@ async fn main() -> Result<(), anyhow::Error> { let args: Args = Args::parse(); + if std::env::var_os("RUST_LOG").is_none() { + std::env::set_var("RUST_LOG", "info"); + } + let subscriber = tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env()); #[cfg(debug_assertions)] let subscriber = subscriber.pretty(); -- rgit 0.1.3