diff --git a/app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java b/app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java index 06682179fb46f11730281a0e6a1ca12989e6762b..c6d8f1981729ca5f1f73902eeff3a269675a6f1f 100755 --- a/app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java +++ b/app/src/main/java/foundation/e/blisslauncher/BlissLauncher.java @@ -8,6 +8,10 @@ import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; import android.provider.Settings; +import android.util.Log; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import foundation.e.blisslauncher.core.DeviceProfile; import foundation.e.blisslauncher.core.IconsHandler; @@ -29,6 +33,18 @@ public class BlissLauncher extends Application { private static WidgetHost sAppWidgetHost; private static AppWidgetManager sAppWidgetManager; + private static class ReleaseTree extends Timber.Tree { + + @Override + protected void log(int priority, @Nullable String tag, @NonNull String message, @Nullable Throwable throwable) { + if (priority < Log.INFO) { + return; + } + + Log.println(priority, tag, message); + } + } + @Override public void onCreate() { super.onCreate(); @@ -49,9 +65,10 @@ public class BlissLauncher extends Application { if (!BuildConfig.DEBUG) { Telemetry.init(BuildConfig.SENTRY_DSN, this, true); + Timber.plant(new ReleaseTree()); + } else { + Timber.plant(new Timber.DebugTree()); } - - Timber.plant(new Timber.DebugTree()); } private void onNotificationSettingsChanged() {