diff --git a/ElementX/Sources/Application/TargetConfiguration.swift b/ElementX/Sources/Application/TargetConfiguration.swift index 681d5afa8..8c829c594 100644 --- a/ElementX/Sources/Application/TargetConfiguration.swift +++ b/ElementX/Sources/Application/TargetConfiguration.swift @@ -8,6 +8,7 @@ import Combine import Foundation +import MapLibre import MatrixRustSDK enum Target: String { @@ -62,6 +63,24 @@ enum Target: String { MXLog.configure(currentTarget: rawValue) + MLNLoggingConfiguration.shared.loggingLevel = .debug + MLNLoggingConfiguration.shared.handler = { loggingLevel, _, _, message in + switch loggingLevel { + case .error: + MXLog.error(message) + case .warning: + MXLog.warning(message) + case .info: + MXLog.info(message) + case .debug: + MXLog.debug(message) + case .verbose: + MXLog.verbose(message) + default: + break + } + } + let hookCancellable = rageshakeURL.publisher .sink { _ in appHooks.tracingHook.update(tracingConfiguration, with: rageshakeURL) diff --git a/ElementX/Sources/Other/MapLibre/MapLibreStaticMapView.swift b/ElementX/Sources/Other/MapLibre/MapLibreStaticMapView.swift index 0ddca93a8..efe69da68 100644 --- a/ElementX/Sources/Other/MapLibre/MapLibreStaticMapView.swift +++ b/ElementX/Sources/Other/MapLibre/MapLibreStaticMapView.swift @@ -66,7 +66,8 @@ struct MapLibreStaticMapView: View { .aspectRatio(contentMode: .fill) pinAnnotationView } - case .failure: + case .failure(let error): + let _ = MXLog.error("Failed retrieving tile with error: \(error.localizedDescription)") errorView @unknown default: EmptyView()