Reduce verbosity of tracing span output

This commit is contained in:
Félix Saparelli 2022-01-15 16:40:01 +13:00
parent f0435eeaf3
commit 1ce238949e
No known key found for this signature in database
GPG key ID: B948C4BAE44FC474
2 changed files with 3 additions and 2 deletions

View file

@ -36,7 +36,8 @@ async fn main() -> Result<()> {
});
if verbosity > 2 {
builder = builder.with_span_events(tracing_subscriber::fmt::format::FmtSpan::FULL);
use tracing_subscriber::fmt::format::FmtSpan;
builder = builder.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE);
}
if verbosity > 3 {

View file

@ -206,7 +206,7 @@ fn tracing_init() {
};
Subscriber::builder()
.pretty()
.with_span_events(FmtSpan::FULL)
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
.with_env_filter(EnvFilter::from_default_env())
.finish()
.try_init()