mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-243708 Deadlock between loggers
GitOrigin-RevId: 65510a1f758403d252302c32c64fa9220071adef
This commit is contained in:
committed by
intellij-monorepo-bot
parent
66db2b6829
commit
aacde2aa69
@@ -45,6 +45,7 @@ import com.intellij.util.ui.StartupUiUtil;
|
||||
import org.apache.log4j.ConsoleAppender;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.PatternLayout;
|
||||
import org.apache.log4j.helpers.LogLog;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -593,6 +594,10 @@ public final class StartupUtil {
|
||||
if (Boolean.parseBoolean(System.getProperty("intellij.log.stdout", "true"))) {
|
||||
System.setOut(new PrintStreamLogger("STDOUT", System.out));
|
||||
System.setErr(new PrintStreamLogger("STDERR", System.err));
|
||||
// Disabling output to System.err seems to be the only way to avoid deadlock (https://youtrack.jetbrains.com/issue/IDEA-243708)
|
||||
// with Log4j 1.x if an internal error happens during logging (e.g. a disk space issue).
|
||||
// Should be revisited in case of migration to Log4j 2.
|
||||
LogLog.setQuietMode(true);
|
||||
}
|
||||
return log;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user