test(tracing): allow tracer init to fail (#5988)

This commit is contained in:
Alexey Shekhirin
2024-01-09 18:55:31 +00:00
committed by GitHub
parent 514750fb1a
commit 467c22b38b

View File

@ -208,7 +208,9 @@ impl Tracer for RethTracer {
None
};
tracing_subscriber::registry().with(layers.into_inner()).init();
// The error is returned if the global default subscriber is already set,
// so it's safe to ignore it
let _ = tracing_subscriber::registry().with(layers.into_inner()).try_init();
Ok(file_guard)
}
}