Skip to content

Commit

Permalink
Merge pull request #269 from dora-rs/add-warn-log
Browse files Browse the repository at this point in the history
Filter default log level at `warn` for `tokio::tracing`
  • Loading branch information
phil-opp authored Apr 27, 2023
2 parents 21aa5c9 + d4b3468 commit 4198b63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/extensions/telemetry/tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! able to serialize and deserialize context that has been sent via the middleware.
use eyre::Context as EyreContext;
use tracing::metadata::LevelFilter;
use tracing_subscriber::{prelude::__tracing_subscriber_SubscriberExt, EnvFilter, Layer};

use eyre::ContextCompat;
Expand All @@ -12,7 +13,7 @@ pub mod telemetry;

pub fn set_up_tracing(name: &str) -> eyre::Result<()> {
// Filter log using `RUST_LOG`. More useful for CLI.
let filter = EnvFilter::from_default_env();
let filter = EnvFilter::from_default_env().add_directive(LevelFilter::WARN.into());
let stdout_log = tracing_subscriber::fmt::layer()
.pretty()
.with_filter(filter);
Expand Down

0 comments on commit 4198b63

Please sign in to comment.