Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/io/flutter/android/AndroidSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import io.flutter.FlutterUtils;
import io.flutter.logging.PluginLogger;
import io.flutter.settings.FlutterSettings;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -29,7 +31,7 @@
* A wrapper around an Android SDK on disk.
*/
public class AndroidSdk {
private static final @NotNull Logger LOG = Logger.getInstance(AndroidSdk.class);
private static final @NotNull Logger LOG = PluginLogger.createLogger(AndroidSdk.class);

@Nullable
public static AndroidSdk createFromProject(@NotNull Project project) {
Expand Down Expand Up @@ -128,7 +130,11 @@ public void onTextAvailable(@NotNull ProcessEvent event, @NotNull Key outputType
return emulators;
}
catch (ExecutionException | RuntimeException e) {
FlutterUtils.warn(LOG, "Error listing android emulators", e);
if (FlutterSettings.getInstance().isFilePathLoggingEnabled()) {
LOG.warn("Error listing android emulators", e);
} else {
LOG.warn("Error listing android emulators");
}
return Collections.emptyList();
}
}
Expand Down