We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cea8ea commit fa93d7aCopy full SHA for fa93d7a
src/io/flutter/logging/PluginLogger.java
@@ -5,6 +5,7 @@
5
*/
6
package io.flutter.logging;
7
8
+import com.intellij.openapi.application.ApplicationManager;
9
import com.intellij.openapi.application.PathManager;
10
import com.intellij.openapi.diagnostic.LogLevel;
11
import com.intellij.openapi.diagnostic.Logger;
@@ -41,8 +42,10 @@ public class PluginLogger {
41
42
43
static {
44
rootLogger.addHandler(fileHandler);
- updateLogLevel();
45
- FlutterSettings.getInstance().addListener(PluginLogger::updateLogLevel);
+ if (ApplicationManager.getApplication() != null) {
46
+ updateLogLevel();
47
+ FlutterSettings.getInstance().addListener(PluginLogger::updateLogLevel);
48
+ }
49
}
50
51
private static void updateLogLevel() {
0 commit comments