Add emoji and privacy to routing logs

This commit is contained in:
Garth Vander Houwen 2024-07-16 21:27:00 -07:00
parent 8b78f7f19a
commit db330535e6

View file

@ -17,7 +17,7 @@ class Router: ObservableObject {
self.navigationState = navigationState
$navigationState.sink { destination in
Logger.services.info("Routed to \(String(describing: destination))")
Logger.services.info("🛣 Routed to \(String(describing: destination), privacy: .public)")
}.store(in: &cancellables)
}
@ -27,11 +27,11 @@ class Router: ObservableObject {
func route(url: URL) {
guard url.scheme == "meshtastic" else {
Logger.services.error("Received routing URL \(url) with invalid scheme. Ignoring route.")
Logger.services.error("🛣 Received routing URL \(url, privacy: .public) with invalid scheme. Ignoring route.")
return
}
guard let components = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
Logger.services.error("Received routing URL \(url) with invalid host path. Ignoring route.")
Logger.services.error("🛣 Received routing URL \(url, privacy: .public) with invalid host path. Ignoring route.")
return
}