56
56
* console.
57
57
*/
58
58
public class FlutterConsoleLogManager {
59
- private static final @ NotNull Logger LOG = Logger . getInstance (FlutterConsoleLogManager .class );
59
+ private static final @ NotNull Logger LOG = PluginLogger . createLogger (FlutterConsoleLogManager .class );
60
60
61
61
private static final String consolePreferencesSetKey = "io.flutter.console.preferencesSet" ;
62
62
private static final String DEEP_LINK_GROUP_ID = "deeplink" ;
@@ -135,7 +135,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
135
135
processFlutterErrorEvent (diagnosticsNode );
136
136
}
137
137
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
+ }
139
143
}
140
144
finally {
141
145
queueLength .decrementAndGet ();
@@ -148,7 +152,11 @@ public void handleFlutterErrorEvent(@NotNull Event event) {
148
152
}
149
153
}
150
154
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
+ }
152
160
}
153
161
}
154
162
@@ -166,7 +174,11 @@ public void flushFlutterErrorQueue() {
166
174
}
167
175
}
168
176
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
+ }
170
182
}
171
183
}
172
184
}
@@ -411,7 +423,11 @@ public void handleLoggingEvent(@NotNull Event event) {
411
423
processLoggingEvent (event );
412
424
}
413
425
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
+ }
415
431
}
416
432
});
417
433
}
0 commit comments