Skip to content

Commit

Permalink
Fix missing logs when no RUST_LOG env var is given
Browse files Browse the repository at this point in the history
  • Loading branch information
w4 committed Jan 15, 2024
1 parent bcdd641 commit 4f1b17b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ impl FromStr for RefreshInterval {
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();
Expand Down

0 comments on commit 4f1b17b

Please sign in to comment.