mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Setup proper logging for MapLibre and location views.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -66,7 +66,8 @@ struct MapLibreStaticMapView<PinAnnotation: View>: 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()
|
||||
|
||||
Reference in New Issue
Block a user