From ad5fffe0ed59c917f64e6761069eb8d20410bdca Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Tue, 5 Sep 2023 09:52:48 +0100 Subject: [PATCH] Add client and OIDC tracing targets. (#1628) --- ElementX/Sources/Other/Logging/RustTracing.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ElementX/Sources/Other/Logging/RustTracing.swift b/ElementX/Sources/Other/Logging/RustTracing.swift index aa8f0c99a..dbb60d195 100644 --- a/ElementX/Sources/Other/Logging/RustTracing.swift +++ b/ElementX/Sources/Other/Logging/RustTracing.swift @@ -73,6 +73,8 @@ struct TracingConfiguration { case hyper, matrix_sdk_ffi, matrix_sdk_crypto + case matrix_sdk_client = "matrix_sdk::client" + case matrix_sdk_oidc = "matrix_sdk::oidc" case matrix_sdk_http_client = "matrix_sdk::http_client" case matrix_sdk_ffi_uniffi_api = "matrix_sdk_ffi::uniffi_api" case matrix_sdk_sliding_sync = "matrix_sdk::sliding_sync" @@ -84,7 +86,10 @@ struct TracingConfiguration { .common: .info, .elementx: .info, .hyper: .warn, + .matrix_sdk_ffi: .info, + .matrix_sdk_client: .info, .matrix_sdk_crypto: .info, + .matrix_sdk_oidc: .info, .matrix_sdk_http_client: .info, .matrix_sdk_sliding_sync: .info, .matrix_sdk_base_sliding_sync: .info, @@ -104,7 +109,8 @@ struct TracingConfiguration { let overrides = Self.targets.keys.reduce(into: [Target: LogLevel]()) { partialResult, target in // Keep the defaults here - if target == .common || target == .hyper { + let ignoredTargets: [Target] = [.common, .hyper] + if ignoredTargets.contains(target) { return }