Переопределить имена библиотек и файлов в отчетах о нефатальных ошибках CraslyticsIOS

Программируем под IOS
Ответить
Гость
 Переопределить имена библиотек и файлов в отчетах о нефатальных ошибках Craslytics

Сообщение Гость »


We're using Crashlytics in our app for crash reporting and general logging tool.

Naturally, to avoid importing Firebase into every part of our app, we wrap the logging functionality in a Logger interface, and inject Firebase at the top level.

public protocol Logger { func log(error: Error) } final class LoggerImpl: Logger { func log(error: Error) { Crashlytics.crashlytics().record(error: error) } } Frustratingly, this means every non-fatal we log implicates the top-level app module, and the LoggerImpl file.


Изображение


We need to drill down into the error's stack trace (Crashlytics uses NSThread callStackReturnAddresses internally) to find the culprit.


Изображение


Is there any way to override behaviour on Crashlytics so this extremely common dependency-injection pattern can work better?

Looking through the Crashlytics API itself, the only method which seems plausible is recordError(error: userInfo:), however I was unable to find any documentation or work out any combination of keys and values which overrode the basic library/file in the UI.

If anyone has any thoughts, please let me know! I've also created a feature request in the Firebase Github page.


Источник: https://stackoverflow.com/questions/781 ... or-reports
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»