From 2cb6ee8e6dc0defd68ba0bf0c816f2b4a235dec7 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 16 Jan 2025 14:34:11 +0200 Subject: [PATCH] chore(ffi): silence useless logs coming out of the ffi crate Setting the default log level to `debug` results in logs like: ``` log: log_event log: latest_event log: log_event log: log_event log: room_info log: latest_event log: log_event log: room_info ``` Presumably they're coming out of the custom tracing configuration and we definitely don't need them. --- bindings/matrix-sdk-ffi/src/platform.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/platform.rs b/bindings/matrix-sdk-ffi/src/platform.rs index 95cccccdfa5..9d0211d700a 100644 --- a/bindings/matrix-sdk-ffi/src/platform.rs +++ b/bindings/matrix-sdk-ffi/src/platform.rs @@ -288,8 +288,9 @@ const DEFAULT_TARGET_LOG_LEVELS: &[(LogTarget, LogLevel)] = &[ ]; const IMMUTABLE_TARGET_LOG_LEVELS: &[LogTarget] = &[ - LogTarget::Hyper, // Too verbose - LogTarget::MatrixSdk, // Too generic + LogTarget::Hyper, // Too verbose + LogTarget::MatrixSdk, // Too generic + LogTarget::MatrixSdkFfi, // Too verbose ]; #[derive(uniffi::Record)] @@ -398,7 +399,7 @@ mod tests { filter, "panic=error,\ hyper=warn,\ - matrix_sdk_ffi=trace,\ + matrix_sdk_ffi=info,\ matrix_sdk=info,\ matrix_sdk::client=trace,\ matrix_sdk_crypto=trace,\