diff --git a/src/filter.rs b/src/filter.rs index a2e53fe..c94ced1 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -18,7 +18,7 @@ impl OtelFilter { impl Default for OtelFilter { fn default() -> Self { - Self { log_level: crate::otlp::read_log_level_from_env() } + Self::new(crate::otlp::read_log_level_from_env()) } } diff --git a/src/lib.rs b/src/lib.rs index 05f2593..0b7b11b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ use opentelemetry_sdk::{ resource::{OsResourceDetector, ResourceDetector}, Resource, }; -use tracing::{Subscriber, level_filters::LevelFilter}; +use tracing::{level_filters::LevelFilter, Subscriber}; use tracing_subscriber::fmt::writer::MakeWriterExt; use tracing_subscriber::{ fmt::format::FmtSpan, layer::SubscriberExt, registry::LookupSpan, Layer,