mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jcef] Use separate files for chromium and jcef logs
GitOrigin-RevId: 0b603a40a70656b7f27cb3e3b6a11aec220dbca0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3460831913
commit
f2dfbb1322
@@ -168,6 +168,8 @@ public final class JBCefApp {
|
||||
}
|
||||
else {
|
||||
CefSettings settings = Cancellation.forceNonCancellableSectionInClassInitializer(() -> SettingsHelper.loadSettings(config));
|
||||
final String logPath = SettingsHelper.getLogPath();
|
||||
CefLog.init(logPath, settings.log_severity);
|
||||
|
||||
JBCefHealthMonitor.getInstance().performHealthCheckAsync(settings, () -> {
|
||||
CefApp.startup(ArrayUtil.EMPTY_STRING_ARRAY);
|
||||
@@ -182,8 +184,8 @@ public final class JBCefApp {
|
||||
// Init verbose chromium logging to stderr via 'vmodule' (to decrease output size)
|
||||
args = ArrayUtil.mergeArrays(args, "--enable-logging=stderr", "--vmodule=statistics_recorder*=0", "--v=1");
|
||||
}
|
||||
if (settings.log_severity != CefSettings.LogSeverity.LOGSEVERITY_DISABLE || settings.log_file != null)
|
||||
LOG.info(String.format("JCEF logging: level=%s, file=%s", settings.log_severity, settings.log_file));
|
||||
if (settings.log_severity != CefSettings.LogSeverity.LOGSEVERITY_DISABLE || settings.log_file != null || logPath != null)
|
||||
LOG.info(String.format("JCEF logging: level=%s, file=%s, chromium_log=%s", settings.log_severity, logPath, settings.log_file));
|
||||
|
||||
myCefArgs = args;
|
||||
CefApp.addAppHandler(new MyCefAppHandler(args, trackGPUCrashes.get()));
|
||||
|
||||
@@ -56,7 +56,7 @@ final class SettingsHelper {
|
||||
CefSettings settings = config.getCefSettings();
|
||||
settings.windowless_rendering_enabled = isOffScreenRenderingModeEnabled();
|
||||
settings.log_severity = getLogLevel();
|
||||
settings.log_file = getLogPath();
|
||||
settings.log_file = getChromiumLogPath();
|
||||
|
||||
//todo[tav] IDEA-260446 & IDEA-260344 However, without proper background the CEF component flashes white in dark themes
|
||||
//settings.background_color = settings.new ColorType(bg.getAlpha(), bg.getRed(), bg.getGreen(), bg.getBlue());
|
||||
@@ -239,7 +239,7 @@ final class SettingsHelper {
|
||||
case "warning" -> CefSettings.LogSeverity.LOGSEVERITY_WARNING;
|
||||
case "error" -> CefSettings.LogSeverity.LOGSEVERITY_ERROR;
|
||||
case "fatal" -> CefSettings.LogSeverity.LOGSEVERITY_FATAL;
|
||||
default -> CefSettings.LogSeverity.LOGSEVERITY_DEFAULT;
|
||||
default -> CefSettings.LogSeverity.LOGSEVERITY_DISABLE;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -257,7 +257,13 @@ final class SettingsHelper {
|
||||
|
||||
final String def = PathManager.getLogPath() + Platform.current().fileSeparator + "jcef_" + ProcessHandle.current().pid() + ".log";
|
||||
final String result = Utils.getString("ide.browser.jcef.log.path", def).trim();
|
||||
return result.isEmpty() || result.equals("null") ? null : result;
|
||||
return result.isEmpty() || result.equals("null") || result.equals("stderr") ? null : result;
|
||||
}
|
||||
|
||||
static String getChromiumLogPath() {
|
||||
final String def = PathManager.getLogPath() + Platform.current().fileSeparator + "jcef_chromium_" + ProcessHandle.current().pid() + ".log";
|
||||
final String result = Utils.getString("ide.browser.jcef.log_chromium.path", def).trim();
|
||||
return result.isEmpty() || result.equals("null") || result.equals("stderr") ? null : result;
|
||||
}
|
||||
|
||||
private static @Nullable String readLinuxDistributionFromOsRelease() {
|
||||
|
||||
Reference in New Issue
Block a user