diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java index 5894bd4f49f3..0dd4052bc497 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java @@ -42,6 +42,7 @@ public class UpdateCheckerComponent implements Disposable, ApplicationComponent private static final long CHECK_INTERVAL = DateFormatUtil.DAY; static final String SELF_UPDATE_STARTED_FOR_BUILD_PROPERTY = "ide.self.update.started.for.build"; + private static final String ERROR_LOG_FILE_NAME = "idea_updater_error.log";//must be equal to com.intellij.updater.Runner.ERROR_LOG_FILE_NAME private final Alarm myCheckForUpdatesAlarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD); private final Runnable myCheckRunnable = () -> UpdateChecker.updateAndShowResult().doWhenProcessed(() -> queueNextCheck(CHECK_INTERVAL)); @@ -131,7 +132,7 @@ public class UpdateCheckerComponent implements Disposable, ApplicationComponent private static void checkIfPreviousUpdateFailed() { PropertiesComponent properties = PropertiesComponent.getInstance(); if (ApplicationInfo.getInstance().getBuild().asString().equals(properties.getValue(SELF_UPDATE_STARTED_FOR_BUILD_PROPERTY))) { - File updateErrorsLog = new File(PathManager.getLogPath(), "idea_updater_error.log"); + File updateErrorsLog = new File(PathManager.getLogPath(), ERROR_LOG_FILE_NAME); try { if (updateErrorsLog.isFile() && !StringUtil.isEmptyOrSpaces(FileUtil.loadFile(updateErrorsLog))) { FUSApplicationUsageTrigger.getInstance().trigger(IdeUpdateUsageTriggerCollector.class, "update.failed"); diff --git a/updater/src/com/intellij/updater/Runner.java b/updater/src/com/intellij/updater/Runner.java index 16743decf375..f063cfccc2d3 100644 --- a/updater/src/com/intellij/updater/Runner.java +++ b/updater/src/com/intellij/updater/Runner.java @@ -19,6 +19,7 @@ import java.util.zip.ZipInputStream; public class Runner { private static final String PATCH_FILE_NAME = "patch-file.zip"; + private static final String ERROR_LOG_FILE_NAME = "idea_updater_error.log";//must be equal to com.intellij.openapi.updateSettings.impl.UpdateCheckerComponent.ERROR_LOG_FILE_NAME private static Logger logger = null; private static String logPath = null; @@ -159,7 +160,7 @@ public class Runner { update.activateOptions(); FileAppender updateError = new FileAppender(); - updateError.setFile(new File(logDirectory, "idea_updater_error.log").getAbsolutePath()); + updateError.setFile(new File(logDirectory, ERROR_LOG_FILE_NAME).getAbsolutePath()); updateError.setLayout(new PatternLayout("%d{dd/MM HH:mm:ss} %-5p %C{1}.%M - %m%n")); updateError.setThreshold(Level.ERROR); updateError.setAppend(false);