Drop redundant log-to-tracing bridge init
tracing-subscriber .init() already installs the LogTracer via its default tracing-log feature; the explicit init only produced a startup warning. Remove it and the direct tracing-log dependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
d504ebc85f
commit
21e1b10c0b
|
|
@ -749,7 +749,6 @@ dependencies = [
|
|||
"tonic",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-log",
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ tonic-prost = "0.14"
|
|||
tonic-prost-build = "0.14"
|
||||
tracing = "0.1"
|
||||
tracing-appender = "0.2"
|
||||
tracing-log = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
url = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -22,5 +22,4 @@ tokio-stream = { workspace = true, features = ["sync"] }
|
|||
tonic.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-appender.workspace = true
|
||||
tracing-log.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
|
|
|
|||
|
|
@ -77,16 +77,13 @@ fn init_tracing() -> tracing_appender::non_blocking::WorkerGuard {
|
|||
.with_file(true)
|
||||
.with_line_number(true);
|
||||
|
||||
// .init() also installs the log-to-tracing bridge for libraries that
|
||||
// use the `log` crate (symphonia, cpal, ...).
|
||||
tracing_subscriber::registry()
|
||||
.with(env_filter)
|
||||
.with(fmt_layer)
|
||||
.init();
|
||||
|
||||
// Forward records from libraries that use the `log` crate (symphonia,
|
||||
// cpal, ...) into tracing.
|
||||
if let Err(err) = tracing_log::LogTracer::init() {
|
||||
warn!("failed to initialize log-to-tracing bridge: {err}");
|
||||
}
|
||||
guard
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue