From e440475755a71d557bba46cfe09ca1a6d51ae617 Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Tue, 27 Dec 2022 22:58:29 +1300 Subject: [PATCH] If no RUST_LOG env is set, default to Info --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0c8c09ef..574eeff3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,10 +20,14 @@ use crate::comms::BusMessage; use crate::error::Error; use crate::globals::GLOBALS; use std::ops::DerefMut; -use std::{mem, thread}; +use std::{env, mem, thread}; use tracing_subscriber::filter::EnvFilter; fn main() -> Result<(), Error> { + if env::var("RUST_LOG").is_err() { + env::set_var("RUST_LOG", "info"); + } + tracing_subscriber::fmt::fmt() .without_time() .with_file(cfg!(debug_assertions))