Skip to content

Commit ea5cb26

Browse files
committed
LogFactory obtains ClassLoader-specific LoggerContext for Log4J
Issue: SPR-14512
1 parent 32bda47 commit ea5cb26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-core/src/main/java/org/apache/commons/logging/LogFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ private static class Log4jLog implements Log, Serializable {
172172

173173
private static final String FQCN = Log4jLog.class.getName();
174174

175-
private static final LoggerContext loggerContext = LogManager.getContext();
175+
private static final LoggerContext loggerContext =
176+
LogManager.getContext(Log4jLog.class.getClassLoader(), false);
176177

177178
private final ExtendedLogger logger;
178179

0 commit comments

Comments
 (0)