Skip to content

Commit dec96dc

Browse files
authored
Use plugin logger for embedded browser (#8370)
Related to #8369
1 parent 01200f2 commit dec96dc

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/io/flutter/jxbrowser/EmbeddedJxBrowser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.teamdev.jxbrowser.view.swing.BrowserView;
2323
import com.teamdev.jxbrowser.view.swing.callback.DefaultAlertCallback;
2424
import com.teamdev.jxbrowser.view.swing.callback.DefaultConfirmCallback;
25+
import io.flutter.logging.PluginLogger;
2526
import io.flutter.settings.FlutterSettings;
2627
import io.flutter.utils.AsyncUtils;
2728
import io.flutter.utils.JxBrowserUtils;
@@ -122,7 +123,7 @@ public JComponent getTabComponent(ContentManager contentManager) {
122123
}
123124

124125
public class EmbeddedJxBrowser extends EmbeddedBrowser {
125-
private static final @NotNull Logger LOG = Logger.getInstance(JxBrowserManager.class);
126+
private static final @NotNull Logger LOG = PluginLogger.createLogger(JxBrowserManager.class);
126127
private static final String INSTALLATION_IN_PROGRESS_LABEL = "Installing JxBrowser...";
127128
private static final String INSTALLATION_TIMED_OUT_LABEL =
128129
"Waiting for JxBrowser installation timed out. Restart your IDE to try again.";
@@ -167,7 +168,7 @@ private EmbeddedJxBrowser(@NotNull Project project) {
167168
}
168169

169170
@Override
170-
public Logger logger() {
171+
public @NotNull Logger logger() {
171172
return LOG;
172173
}
173174

src/io/flutter/view/EmbeddedBrowser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static public class BrowserTab {
5050

5151
protected final Map<@NotNull String, Map<@NotNull String, @NotNull BrowserTab>> windows = new HashMap<>();
5252

53-
public abstract Logger logger();
53+
public abstract @NotNull Logger logger();
5454

5555
private DevToolsUrl url;
5656

src/io/flutter/view/EmbeddedJcefBrowser.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.intellij.ui.content.ContentManager;
1111
import com.intellij.ui.jcef.JBCefBrowser;
1212
import io.flutter.jxbrowser.JxBrowserManager;
13+
import io.flutter.logging.PluginLogger;
1314
import org.jetbrains.annotations.NotNull;
1415

1516
import javax.swing.*;
@@ -47,7 +48,7 @@ public JComponent getTabComponent(ContentManager contentManager) {
4748
}
4849

4950
public class EmbeddedJcefBrowser extends EmbeddedBrowser {
50-
private static final @NotNull Logger LOG = Logger.getInstance(JxBrowserManager.class);
51+
private static final @NotNull Logger LOG = PluginLogger.createLogger(JxBrowserManager.class);
5152

5253
public EmbeddedJcefBrowser(Project project) {
5354
super(project);
@@ -58,7 +59,7 @@ public static EmbeddedJcefBrowser getInstance(@NotNull Project project) {
5859
return Objects.requireNonNull(project.getService(EmbeddedJcefBrowser.class));
5960
}
6061

61-
public Logger logger() {
62+
public @NotNull Logger logger() {
6263
return LOG;
6364
}
6465

0 commit comments

Comments
 (0)