diff --git a/Tusker/Views/Toast/ToastConfiguration.swift b/Tusker/Views/Toast/ToastConfiguration.swift index 2915b48b..3c1f69d8 100644 --- a/Tusker/Views/Toast/ToastConfiguration.swift +++ b/Tusker/Views/Toast/ToastConfiguration.swift @@ -9,6 +9,7 @@ import UIKit import Pachyderm import Sentry +import OSLog struct ToastConfiguration { var systemImageName: String? @@ -89,6 +90,8 @@ fileprivate extension Pachyderm.Client.Error { } } +private let toastErrorLogger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "ToastError") + private func captureError(_ error: Client.Error, title: String) { let event = Event(error: error) event.message = SentryMessage(formatted: "\(title): \(error)") @@ -123,4 +126,6 @@ private func captureError(_ error: Client.Error, title: String) { return } SentrySDK.capture(event: event) + + toastErrorLogger.error("\(title, privacy: .public): \(error), \(event.tags!.debugDescription, privacy: .public)") }