fix: set logging var, only if one is not provided

This commit is contained in:
Aravinth Manivannan 2023-10-18 13:21:33 +05:30
parent 8ec5122f87
commit 61729c5fae
No known key found for this signature in database
GPG key ID: F8F50389936984FF

View file

@ -93,7 +93,9 @@ pub type AppData = actix_web::web::Data<ArcData>;
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!(