Skip to content

Commit

Permalink
style: fix log_level
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Oct 12, 2023
1 parent 2558325 commit ff132ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ mod path;

#[tokio::main]
async fn main() {
let log_level = env::var("LOG_LEVEL").unwrap_or_else(|_| "info".to_string());
let log_level = env::var("LOG_LEVEL").unwrap_or("info".to_string());
let level_filter = match log_level.as_str() {
"off" => log::LevelFilter::Off,
"error" => log::LevelFilter::Error,
"warn" => log::LevelFilter::Warn,
"info" => log::LevelFilter::Info,
"debug" => log::LevelFilter::Debug,
"trace" => log::LevelFilter::Trace,
_ => log::LevelFilter::Info,
_ => log::LevelFilter::Info,
};
env_logger::builder()
.filter_level(level_filter)
Expand Down

0 comments on commit ff132ab

Please sign in to comment.