55
55
import io .flutter .bazel .Workspace ;
56
56
import io .flutter .bazel .WorkspaceCache ;
57
57
import io .flutter .dart .FlutterDartAnalysisServer ;
58
+ import io .flutter .logging .PluginLogger ;
58
59
import io .flutter .run .common .RunMode ;
59
60
import io .flutter .run .daemon .FlutterApp ;
60
61
import io .flutter .settings .FlutterSettings ;
74
75
* Handle the mechanics of performing a hot reload on file save.
75
76
*/
76
77
public class FlutterReloadManager {
77
- private static final @ NotNull Logger LOG = Logger . getInstance (FlutterReloadManager .class );
78
+ private static final @ NotNull Logger LOG = PluginLogger . createLogger (FlutterReloadManager .class );
78
79
79
80
private static final Map <String , NotificationGroup > toolWindowNotificationGroups = new HashMap <>();
80
81
@@ -142,7 +143,7 @@ public void beforeActionPerformed(@NotNull AnAction action, @NotNull AnActionEve
142
143
}
143
144
catch (Throwable t ) {
144
145
// A catch-all, so any exceptions don't bubble through to the users.
145
- LOG .warn ("Exception from FlutterReloadManager" , t );
146
+ FlutterUtils .warn (LOG , "Exception from FlutterReloadManager" , t , true );
146
147
}
147
148
}
148
149
@@ -161,7 +162,7 @@ public void afterActionPerformed(@NotNull AnAction action, @NotNull AnActionEven
161
162
handleSaveAllNotification (eventEditor );
162
163
}
163
164
catch (Throwable t ) {
164
- FlutterUtils .warn (LOG , "Exception from hot reload on save" , t );
165
+ FlutterUtils .warn (LOG , "Exception from hot reload on save" , t , true );
165
166
}
166
167
finally {
167
168
// Context: "Released EditorImpl held by lambda in FlutterReloadManager" (https://github.com/flutter/flutter-intellij/issues/7507)
@@ -325,7 +326,7 @@ private void syncFiles() {
325
326
}
326
327
}
327
328
catch (ExecutionException | InterruptedException e ) {
328
- LOG .error ("Unable to sync files: " + e );
329
+ FlutterUtils .error (LOG , "Unable to sync files" , e , true );
329
330
}
330
331
}
331
332
0 commit comments