Slide 57
Slide 57 text
CRASH REPORTING TREE
private static class CrashReportingTree extends Timber.Tree {
@Override
protected void log(int priority, String tag, String message, Throwable t) {
if (priority == Log.VERBOSE || priority == Log.DEBUG) {
return;
}
// will write to the crash report but NOT to logcat
Crashlytics.log(message);
if (t != null) {
Crashlytics.logException(t);
}
}
}