diff --git a/Cargo.lock b/Cargo.lock index 9185b0f..64d58e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -749,7 +749,6 @@ dependencies = [ "tonic", "tracing", "tracing-appender", - "tracing-log", "tracing-subscriber", ] diff --git a/Cargo.toml b/Cargo.toml index 736d9d8..c086f69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/crabidy-server/Cargo.toml b/crabidy-server/Cargo.toml index 6094e07..4298b80 100644 --- a/crabidy-server/Cargo.toml +++ b/crabidy-server/Cargo.toml @@ -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 diff --git a/crabidy-server/src/main.rs b/crabidy-server/src/main.rs index f78111f..f29bd2f 100644 --- a/crabidy-server/src/main.rs +++ b/crabidy-server/src/main.rs @@ -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 }