Skip to content

Commit 20e993d

Browse files
committed
Use PluginLogger for SdkFields class
1 parent cab3fb7 commit 20e993d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/io/flutter/run/SdkFields.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.jetbrains.lang.dart.sdk.DartSdk;
2121
import io.flutter.FlutterBundle;
2222
import io.flutter.dart.DartPlugin;
23+
import io.flutter.logging.PluginLogger;
2324
import io.flutter.pub.PubRoot;
2425
import io.flutter.pub.PubRootCache;
2526
import io.flutter.run.common.RunMode;
@@ -40,7 +41,7 @@
4041
* Fields used when launching an app using the Flutter SDK (non-bazel).
4142
*/
4243
public class SdkFields {
43-
private static final @NotNull Logger LOG = Logger.getInstance(SdkFields.class);
44+
private static final @NotNull Logger LOG = PluginLogger.createLogger(SdkFields.class);
4445
private @Nullable String filePath;
4546
private @Nullable String buildFlavor;
4647
private @Nullable String additionalArgs;
@@ -231,7 +232,11 @@ public GeneralCommandLine createFlutterSdkRunCommand(
231232
args = ArrayUtil.append(args, "--devtools-server-address=http://" + instance.host() + ":" + instance.port());
232233
}
233234
catch (Exception e) {
234-
LOG.info(e);
235+
if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) {
236+
LOG.info(e);
237+
} else {
238+
LOG.info(e.toString());
239+
}
235240
}
236241
command = flutterSdk.flutterRun(root, main.getFile(), device, runMode, flutterLaunchMode, project, args);
237242
final GeneralCommandLine commandLine = command.createGeneralCommandLine(project);

0 commit comments

Comments
 (0)