From 71e9854a33c61d4c63985b5a9ff9965fd20577c3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 24 Jun 2019 23:03:42 -0700 Subject: [PATCH] Fixed logLevel filter bug so that filter now works as expected. (flutter/engine#9460) --- .../shell/platform/android/io/flutter/Log.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/Log.java b/engine/src/flutter/shell/platform/android/io/flutter/Log.java index 1cfa51ff98..724768baee 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/Log.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/Log.java @@ -26,37 +26,37 @@ public class Log { } public static void v(@NonNull String tag, @NonNull String message) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.VERBOSE) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.VERBOSE) { android.util.Log.v(tag, message); } } public static void v(@NonNull String tag, @NonNull String message, @NonNull Throwable tr) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.VERBOSE) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.VERBOSE) { android.util.Log.v(tag, message, tr); } } public static void i(@NonNull String tag, @NonNull String message) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.INFO) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.INFO) { android.util.Log.i(tag, message); } } public static void i(@NonNull String tag, @NonNull String message, @NonNull Throwable tr) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.INFO) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.INFO) { android.util.Log.i(tag, message, tr); } } public static void d(@NonNull String tag, @NonNull String message) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.DEBUG) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.DEBUG) { android.util.Log.d(tag, message); } } public static void d(@NonNull String tag, @NonNull String message, @NonNull Throwable tr) { - if (BuildConfig.DEBUG && logLevel >= android.util.Log.DEBUG) { + if (BuildConfig.DEBUG && logLevel <= android.util.Log.DEBUG) { android.util.Log.d(tag, message, tr); } }