From 61729c5faecc8225a1cc5647139beaf0ddebda7d Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 18 Oct 2023 13:21:33 +0530 Subject: [PATCH] fix: set logging var, only if one is not provided --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5c9f833b..2c44c8fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,9 @@ pub type AppData = actix_web::web::Data; async fn main() -> std::io::Result<()> { use std::time::Duration; - env::set_var("RUST_LOG", "info"); + if env::var("RUST_LOG").is_err() { + env::set_var("RUST_LOG", "info"); + } pretty_env_logger::init(); info!(