Remove "with_line_numbers"

This commit is contained in:
Louis Dureuil 2024-02-08 09:43:21 +01:00
parent 08af0e690c
commit 1b74010e9e
No known key found for this signature in database
4 changed files with 1 additions and 15 deletions

View File

@ -34,7 +34,6 @@ fn setup(opt: &Opt) -> anyhow::Result<LogRouteHandle> {
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())

View File

@ -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);

View File

@ -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()),
);

View File

@ -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();