Search in sources :

Example 1 with LumberYard

use of io.palaima.debugdrawer.timber.data.LumberYard in project SeriesGuide by UweTrottmann.

the class SgApp method initializeLogging.

private void initializeLogging() {
    if (BuildConfig.DEBUG) {
        // debug drawer logging
        LumberYard lumberYard = LumberYard.getInstance(this);
        lumberYard.cleanUp();
        Timber.plant(lumberYard.tree());
        // detailed logcat logging
        Timber.plant(new Timber.DebugTree());
    } else {
        // crash and error reporting
        Timber.plant(new AnalyticsTree(this));
        if (!Fabric.isInitialized()) {
            Fabric.with(this, new Crashlytics());
        }
    }
    // Ensure GA opt-out
    GoogleAnalytics.getInstance(this).setAppOptOut(AppSettings.isGaAppOptOut(this));
    if (BuildConfig.DEBUG) {
        GoogleAnalytics.getInstance(this).setDryRun(true);
    }
    // Initialize tracker
    Analytics.getTracker(this);
}
Also used : LumberYard(io.palaima.debugdrawer.timber.data.LumberYard) Timber(timber.log.Timber) Crashlytics(com.crashlytics.android.Crashlytics)

Aggregations

Crashlytics (com.crashlytics.android.Crashlytics)1 LumberYard (io.palaima.debugdrawer.timber.data.LumberYard)1 Timber (timber.log.Timber)1