Firebase Crashlytics custom log does not appear in the console

前端 未结 5 895
眼角桃花
眼角桃花 2021-02-05 03:56

I\'ve been testing Firebase Crashlytics and even though the normal crash report works right I can\'t success trying to generate a custom as it says the documentatio

相关标签:
5条回答
  • 2021-02-05 04:07

    The logging mechanism of Crashlytics isn't built for normal logging.

    The logs that you put will show in crash reports, not as stand alone logs. Same goes for the user identifier information.

    Try forcing a crash, you should see the logs captured before the crash in the crash report. If you want normal logging, you should look into Firebase analytics, it'll help you keep track of regular events and other analytics data.

    0 讨论(0)
  • 2021-02-05 04:13

    I also had big problems getting anything to show up but I figured it out. In my case the problem was me versus the user interface at the crashlytics site.

    You have to disable the filter saying Event Type="Crashes" to be able to see those other events.

    0 讨论(0)
  • 2021-02-05 04:14

    This worked for me.

    Crashlytics.log(message);
    Crashlytics.logException(exception);
    

    Edit: I had missed this explanation.

    0 讨论(0)
  • 2021-02-05 04:21

    Just for updating the answer for log Kotlin with Firebase it is:

    FirebaseCrashlytics.getInstance().log(error.toString())
    

    And for Exception

    FirebaseCrashlytics.getInstance().recordException(e)
    

    See documentation: https://firebase.google.com/docs/crashlytics/get-started?platform=Android

    0 讨论(0)
  • 2021-02-05 04:23

    For a better understanding, when you collect data with

    FirebaseCrashlytics.getInstance().log("Test w(text)")
    FirebaseCrashlytics.getInstance().log("Test e(text)")
    

    you will get NO new non-fatal crash report in Firebase crashlytics. But follow up by a

    FirebaseCrashlytics.getInstance().recordException(RunTimeException("Test e(throwable)"))
    

    it will send this error

    with this additional log entries within this error

    0 讨论(0)
提交回复
热议问题