5656 * console.
5757 */
5858public class FlutterConsoleLogManager {
59- private static final @ NotNull Logger LOG = Logger . getInstance (FlutterConsoleLogManager .class );
59+ private static final @ NotNull Logger LOG = PluginLogger . createLogger (FlutterConsoleLogManager .class );
6060
6161 private static final String consolePreferencesSetKey = "io.flutter.console.preferencesSet" ;
6262 private static final String DEEP_LINK_GROUP_ID = "deeplink" ;
@@ -135,7 +135,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
135135 processFlutterErrorEvent (diagnosticsNode );
136136 }
137137 catch (Throwable t ) {
138- LOG .warn (t );
138+ if (FlutterSettings .getInstance ().isVerboseLogging ()) {
139+ LOG .warn (t );
140+ } else {
141+ LOG .warn ("Error processing FlutterErrorEvent: " + t .getMessage ());
142+ }
139143 }
140144 finally {
141145 queueLength .decrementAndGet ();
@@ -148,7 +152,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
148152 }
149153 }
150154 catch (Throwable t ) {
151- LOG .warn (t );
155+ if (FlutterSettings .getInstance ().isFilePathLoggingEnabled ()) {
156+ LOG .warn (t );
157+ } else {
158+ LOG .warn ("Error handling FlutterErrorEvent: " + t .getMessage ());
159+ }
152160 }
153161 }
154162
@@ -166,7 +174,11 @@ public void flushFlutterErrorQueue() {
166174 }
167175 }
168176 catch (InterruptedException e ) {
169- LOG .error (e );
177+ if (FlutterSettings .getInstance ().isVerboseLogging ()) {
178+ LOG .error (e );
179+ } else {
180+ LOG .error ("Exception when flushing FlutterErrorQueue: " + e .getMessage ());
181+ }
170182 }
171183 }
172184 }
@@ -411,7 +423,11 @@ public void handleLoggingEvent(@NotNull Event event) {
411423 processLoggingEvent (event );
412424 }
413425 catch (Throwable t ) {
414- LOG .warn (t );
426+ if (FlutterSettings .getInstance ().isVerboseLogging ()) {
427+ LOG .warn (t );
428+ } else {
429+ LOG .warn ("Error processing LoggingEvent: " + t .getMessage ());
430+ }
415431 }
416432 });
417433 }
0 commit comments