diff options
author | Florian Klink <flokli@flokli.de> | 2024-10-19T20·04+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-10-27T12·28+0000 |
commit | 3695f57d84f3ca575a81ebc8a59acb86f4ff405c (patch) | |
tree | 88b24d013c0a8291d22bcaaf675d659fd788f11b /tvix/tracing/src/lib.rs | |
parent | 7dd895c2588075f488def933c9e2937d4d65047b (diff) |
feat(tvix/tracing): filter indicatif.pb_show fields in all cases r/8863
Change-Id: I688cec79cefeae340872945c35743fae892cd053 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12688 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: yuka <yuka@yuka.dev> Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/tracing/src/lib.rs')
-rw-r--r-- | tvix/tracing/src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/tracing/src/lib.rs b/tvix/tracing/src/lib.rs index 7d5ab56f55ed..05a3468b93b8 100644 --- a/tvix/tracing/src/lib.rs +++ b/tvix/tracing/src/lib.rs @@ -2,7 +2,9 @@ use indicatif::ProgressStyle; use std::sync::LazyLock; use tokio::sync::{mpsc, oneshot}; use tracing::Level; -use tracing_indicatif::{filter::IndicatifFilter, writer, IndicatifLayer, IndicatifWriter}; +use tracing_indicatif::{ + filter::IndicatifFilter, util::FilteredFormatFields, writer, IndicatifLayer, IndicatifWriter, +}; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer}; #[cfg(feature = "otlp")] @@ -205,6 +207,10 @@ impl TracingBuilder { ) .with( tracing_subscriber::fmt::Layer::new() + .fmt_fields(FilteredFormatFields::new( + tracing_subscriber::fmt::format::DefaultFields::new(), + |field| field.name() != "indicatif.pb_show", + )) .with_writer(indicatif_layer.get_stderr_writer()) .compact(), ) |