From d4f5ac152a428f2de067167a166e74744f49d8b6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 20 Mar 2025 16:38:27 +0100 Subject: [PATCH] feat(ffi): log the log targets and levels --- bindings/matrix-sdk-ffi/src/platform.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bindings/matrix-sdk-ffi/src/platform.rs b/bindings/matrix-sdk-ffi/src/platform.rs index ecf538297..4da3859fb 100644 --- a/bindings/matrix-sdk-ffi/src/platform.rs +++ b/bindings/matrix-sdk-ffi/src/platform.rs @@ -410,11 +410,16 @@ fn build_tracing_filter(config: &TracingConfiguration) -> String { pub fn init_platform(config: TracingConfiguration, use_lightweight_tokio_runtime: bool) { log_panics(); + let env_filter = build_tracing_filter(&config); + tracing_subscriber::registry() - .with(EnvFilter::new(build_tracing_filter(&config))) + .with(EnvFilter::new(&env_filter)) .with(text_layers(config)) .init(); + // Log the log levels 🧠. + tracing::info!(env_filter, "Logging has been set up"); + if use_lightweight_tokio_runtime { setup_lightweight_tokio_runtime(); } else {