plant DebugTree on startup

This commit is contained in:
Vincent Breitmoser 2018-01-20 02:13:16 +01:00
parent 22c65f2ab8
commit 4a28658c96

View file

@ -41,6 +41,7 @@ import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
import org.sufficientlysecure.keychain.util.PRNGFixes;
import org.sufficientlysecure.keychain.util.Preferences;
import timber.log.Timber;
import timber.log.Timber.DebugTree;
public class KeychainApplication extends Application {
@ -73,6 +74,8 @@ public class KeychainApplication extends Application {
PRNGFixes.apply();
Timber.d("Bouncy Castle set and PRNG Fixes applied!");
updateLoggingStatus();
/*
if (Constants.DEBUG) {
Provider[] providers = Security.getProviders();
@ -171,4 +174,12 @@ public class KeychainApplication extends Application {
}
}
}
private void updateLoggingStatus() {
Timber.uprootAll();
boolean enableDebugLogging = BuildConfig.DEBUG;
if (enableDebugLogging) {
Timber.plant(new DebugTree());
}
}
}