plant DebugTree on startup
This commit is contained in:
parent
22c65f2ab8
commit
4a28658c96
|
@ -41,6 +41,7 @@ import org.sufficientlysecure.keychain.ui.util.FormattingUtils;
|
||||||
import org.sufficientlysecure.keychain.util.PRNGFixes;
|
import org.sufficientlysecure.keychain.util.PRNGFixes;
|
||||||
import org.sufficientlysecure.keychain.util.Preferences;
|
import org.sufficientlysecure.keychain.util.Preferences;
|
||||||
import timber.log.Timber;
|
import timber.log.Timber;
|
||||||
|
import timber.log.Timber.DebugTree;
|
||||||
|
|
||||||
|
|
||||||
public class KeychainApplication extends Application {
|
public class KeychainApplication extends Application {
|
||||||
|
@ -73,6 +74,8 @@ public class KeychainApplication extends Application {
|
||||||
PRNGFixes.apply();
|
PRNGFixes.apply();
|
||||||
Timber.d("Bouncy Castle set and PRNG Fixes applied!");
|
Timber.d("Bouncy Castle set and PRNG Fixes applied!");
|
||||||
|
|
||||||
|
updateLoggingStatus();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (Constants.DEBUG) {
|
if (Constants.DEBUG) {
|
||||||
Provider[] providers = Security.getProviders();
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue