Skip to content

Commit 7685a5d

Browse files
committed
Suppress IDE stack trace for setLevel failure
The stack trace is effectively just the log message being excessively loud because of how IntelliJ handles exceptions passed to the logger. This updates the code to log only the string description of the error instead of the full exception object. This suppresses the noisy IDE error popup while still recording the warning in the log file. This is a follow up on #8631
1 parent 6382f0e commit 7685a5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/flutter/logging/PluginLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static void updateLogLevel() {
5151
catch (Throwable e) {
5252
// This can happen if the logger is wrapped by a 3rd party plugin that doesn't correctly implement setLevel.
5353
// See https://github.com/flutter/flutter-intellij/issues/8631
54-
Logger.getInstance(PluginLogger.class).warn("Failed to set log level", e);
54+
// Use an empty catch block to suppress the exception.
5555
}
5656
}
5757

0 commit comments

Comments
 (0)