|
45 | 45 | import io.flutter.FlutterConstants;
|
46 | 46 | import io.flutter.FlutterUtils;
|
47 | 47 | import io.flutter.dart.DartPlugin;
|
| 48 | +import io.flutter.logging.PluginLogger; |
48 | 49 | import io.flutter.run.bazel.BazelRunConfig;
|
49 | 50 | import io.flutter.run.common.RunMode;
|
50 | 51 | import io.flutter.run.daemon.DaemonConsoleView;
|
51 | 52 | import io.flutter.run.daemon.DeviceService;
|
52 | 53 | import io.flutter.run.daemon.FlutterApp;
|
| 54 | +import io.flutter.settings.FlutterSettings; |
53 | 55 | import io.flutter.toolwindow.ToolWindowBadgeUpdater;
|
54 | 56 | import org.jetbrains.annotations.NotNull;
|
55 | 57 | import org.jetbrains.annotations.Nullable;
|
@@ -180,7 +182,11 @@ protected RunContentDescriptor launch(@NotNull ExecutionEnvironment env) throws
|
180 | 182 | }
|
181 | 183 | }
|
182 | 184 | catch (IllegalAccessException | InvocationTargetException | NoSuchFieldException | NoSuchMethodException e) {
|
183 |
| - LOG.info(e); |
| 185 | + if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) { |
| 186 | + LOG.info(e); |
| 187 | + } else { |
| 188 | + LOG.info(e.toString()); |
| 189 | + } |
184 | 190 | }
|
185 | 191 |
|
186 | 192 | return descriptor;
|
@@ -401,7 +407,11 @@ protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNul
|
401 | 407 | app.shutdownAsync().get();
|
402 | 408 | }
|
403 | 409 | catch (InterruptedException | java.util.concurrent.ExecutionException e) {
|
404 |
| - FlutterUtils.warn(LOG, e); |
| 410 | + if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) { |
| 411 | + LOG.warn(e); |
| 412 | + } else { |
| 413 | + LOG.warn(e.toString()); |
| 414 | + } |
405 | 415 | }
|
406 | 416 | return launchState.launch(env);
|
407 | 417 | }
|
@@ -458,5 +468,5 @@ public static ProcessHandler getRunningAppProcess(@NotNull RunConfig config) {
|
458 | 468 |
|
459 | 469 | private static final Key<RunConfig> FLUTTER_RUN_CONFIG_KEY = new Key<>("FLUTTER_RUN_CONFIG_KEY");
|
460 | 470 |
|
461 |
| - private static final @NotNull Logger LOG = Logger.getInstance(LaunchState.class); |
| 471 | + private static final @NotNull Logger LOG = PluginLogger.createLogger(LaunchState.class); |
462 | 472 | }
|
0 commit comments