Simple logback appender to log to Crashlytics for enhanced crash reports.
Archived due to Fabric Crashlytics beeing superseded by Firebase Crashlytics, see https://github.com/finki001/firebase-crashlytics-logback-appender for same functionality.
Add as dependency in your build.gradle
file:
implementation 'com.github.daberni:crashlytics-logback-appender:0.2.3'
After setting up Fabric/Crashlytics you have to setup the appender for correct logging.
public class AppApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
CrashlyticsLogbackAppender.setup();
}
}
And don't forget the appender in your logback configuration!
<configuration>
<appender name="Crashlytics" class="at.daberni.logback.appender.CrashlyticsLogbackAppender">
<encoder>
<pattern>%class.%method\(%file:%line\) - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="Crashlytics"/>
</root>
</configuration>
This project is licensed under the Apache License Version 2.0.