Skip to content

Commit

Permalink
Fixed logLevel filter bug so that filter now works as expected. (#9460)…
Browse files Browse the repository at this point in the history
… (#9717)
  • Loading branch information
tvolkert committed Jul 9, 2019
1 parent b1cb0d9 commit 54ad777
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions shell/platform/android/io/flutter/Log.java
Expand Up @@ -26,37 +26,37 @@ public static void setLogLevel(int logLevel) {
}

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);
}
}
Expand Down

0 comments on commit 54ad777

Please sign in to comment.