tracing
tracing copied to clipboard
It's not possible to check the source of a `tracing_subscriber::util::TryInitError`
Bug Report
Version
tracing-attributes v0.1.27 (proc-macro)
tracing-core v0.1.32
tracing-log v0.2.0
tracing-serde v0.1.3
tracing-subscriber v0.3.18
tracing v0.1.40
Crates
tracing-subscriber
Description
https://github.com/tokio-rs/tracing/blob/8ba80ae82371638aa749436e4f284b65adf9ff90/tracing-subscriber/src/util.rs#L150-L152
This bypasses returning the direct source of the error (Some(&self.inner)
), so for example there's no way to let Some(source) = try_init_error.source() && source.is::<tracing_log::log_tracer::SetLoggerError>()
to check if the failure reason was initializing the tracing-log
logger.
ah, that doesn't seem great. well, we'd accept a PR fixing this, if you have the time!