Skip to content

Commit

Permalink
set default log level
Browse files Browse the repository at this point in the history
  • Loading branch information
denisu committed Nov 5, 2024
1 parent d2bd049 commit 45eeae7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ struct Opt {
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_target(false)
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();

let opt = Opt::parse();
Expand Down

0 comments on commit 45eeae7

Please # to comment.