Log the crash event's ID to see if duplicate logs are for the same event. (#1350)

This commit is contained in:
Doug
2023-07-18 15:00:33 +01:00
committed by GitHub
parent 7557baf30a
commit 73a7615b7b

View File

@@ -69,12 +69,12 @@ class BugReportService: NSObject, BugReportServiceProtocol {
options.tracesSampleRate = 1.0
options.beforeSend = { event in
MXLog.error("Sentry detected crash: \(event)")
MXLog.error("Sentry detected crash: \(event.eventId.sentryIdString)")
return event
}
options.onCrashedLastRun = { [weak self] event in
MXLog.error("Sentry detected application was crashed: \(event)")
MXLog.error("Sentry detected application was crashed: \(event.eventId.sentryIdString)")
self?.lastCrashEventId = event.eventId.sentryIdString
}
}