From 1b74010e9eb985c06c6ea369ca18b99f58831d29 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 8 Feb 2024 09:43:21 +0100 Subject: [PATCH] Remove "with_line_numbers" --- meilisearch/src/main.rs | 1 - meilisearch/src/routes/logs.rs | 1 - meilisearch/tests/logs/mod.rs | 1 - tracing-trace/src/main.rs | 13 +------------ 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/meilisearch/src/main.rs b/meilisearch/src/main.rs index f7a8e6cff..839550667 100644 --- a/meilisearch/src/main.rs +++ b/meilisearch/src/main.rs @@ -34,7 +34,6 @@ fn setup(opt: &Opt) -> anyhow::Result { let subscriber = tracing_subscriber::registry().with(route_layer).with( tracing_subscriber::fmt::layer() - .with_line_number(true) .with_span_events(tracing_subscriber::fmt::format::FmtSpan::NEW) .with_filter( tracing_subscriber::filter::LevelFilter::from_str(&opt.log_level.to_string()) diff --git a/meilisearch/src/routes/logs.rs b/meilisearch/src/routes/logs.rs index db80d976d..39cf63d9e 100644 --- a/meilisearch/src/routes/logs.rs +++ b/meilisearch/src/routes/logs.rs @@ -164,7 +164,6 @@ fn make_layer< let (sender, receiver) = tokio::sync::mpsc::unbounded_channel(); let fmt_layer = tracing_subscriber::fmt::layer() - .with_line_number(true) .with_writer(move || LogWriter { sender: sender.clone() }) .with_span_events(tracing_subscriber::fmt::format::FmtSpan::ACTIVE); diff --git a/meilisearch/tests/logs/mod.rs b/meilisearch/tests/logs/mod.rs index f9331166d..4091ac775 100644 --- a/meilisearch/tests/logs/mod.rs +++ b/meilisearch/tests/logs/mod.rs @@ -30,7 +30,6 @@ async fn basic_test_log_stream_route() { let subscriber = tracing_subscriber::registry().with(route_layer).with( tracing_subscriber::fmt::layer() - .with_line_number(true) .with_span_events(tracing_subscriber::fmt::format::FmtSpan::ACTIVE) .with_filter(tracing_subscriber::filter::LevelFilter::from_str("INFO").unwrap()), ); diff --git a/tracing-trace/src/main.rs b/tracing-trace/src/main.rs index b9202727d..c2e4f08a7 100644 --- a/tracing-trace/src/main.rs +++ b/tracing-trace/src/main.rs @@ -80,18 +80,7 @@ fn main() { // any number of other subscriber layers may be added before or // after the `ErrorLayer`... .with(ErrorLayer::default()) - .with(profiling_layer) - /*.with( - tracing_subscriber::fmt::layer() - .with_line_number(true) - .with_span_events(FmtSpan::FULL), /*.with_filter( - tracing_subscriber::filter::LevelFilter::from_level(tracing::Level::TRACE).and( - tracing_subscriber::filter::Targets::new() - .with_target("profile", tracing::Level::TRACE) - .not(), - ), - )*/ - )*/; + .with(profiling_layer); // set the subscriber as the default for the application tracing::subscriber::set_global_default(subscriber).unwrap();