Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions src/io/flutter/logging/FlutterConsoleLogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* console.
*/
public class FlutterConsoleLogManager {
private static final @NotNull Logger LOG = Logger.getInstance(FlutterConsoleLogManager.class);
private static final @NotNull Logger LOG = PluginLogger.createLogger(FlutterConsoleLogManager.class);

private static final String consolePreferencesSetKey = "io.flutter.console.preferencesSet";
private static final String DEEP_LINK_GROUP_ID = "deeplink";
Expand Down Expand Up @@ -135,7 +135,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
processFlutterErrorEvent(diagnosticsNode);
}
catch (Throwable t) {
LOG.warn(t);
if (FlutterSettings.getInstance().isVerboseLogging()) {
LOG.warn(t);
} else {
LOG.warn("Error processing FlutterErrorEvent: " + t.getMessage());
}
}
finally {
queueLength.decrementAndGet();
Expand All @@ -148,7 +152,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
}
}
catch (Throwable t) {
LOG.warn(t);
if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) {
LOG.warn(t);
} else {
LOG.warn("Error handling FlutterErrorEvent: " + t.getMessage());
}
}
}

Expand All @@ -166,7 +174,11 @@ public void flushFlutterErrorQueue() {
}
}
catch (InterruptedException e) {
LOG.error(e);
if (FlutterSettings.getInstance().isVerboseLogging()) {
LOG.error(e);
} else {
LOG.error("Exception when flushing FlutterErrorQueue: " + e.getMessage());
}
}
}
}
Expand Down Expand Up @@ -411,7 +423,11 @@ public void handleLoggingEvent(@NotNull Event event) {
processLoggingEvent(event);
}
catch (Throwable t) {
LOG.warn(t);
if (FlutterSettings.getInstance().isVerboseLogging()) {
LOG.warn(t);
} else {
LOG.warn("Error processing LoggingEvent: " + t.getMessage());
}
}
});
}
Expand Down