This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new bf704c0 Add
org.apache.logging.log4j.spi.LoggerContext.getLoggerRegistry().
bf704c0 is described below
commit bf704c08a6284728a4262ebc243eab46f95586e0
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 9 14:58:02 2022 -0500
Add org.apache.logging.log4j.spi.LoggerContext.getLoggerRegistry().
- Add org.apache.logging.log4j.core.LoggerContext.getLoggerRegistry()
- Add
org.apache.logging.log4j.simple.SimpleLoggerContext.getLoggerRegistry().
- Move and make final SimpleLoggerContext singleton declaration from
SimpleLoggerContextFactory to SimpleLoggerContext.
- Add and use singleton SimpleLoggerContextFactory (stateless).
- Split commit 2/2 for cherry-picking to master.
---
.../test/java/org/apache/logging/log4j/simple/SimpleLoggerTest.java | 3 +--
.../org/apache/logging/log4j/core/config/TestConfiguratorError.java | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
a/log4j-api/src/test/java/org/apache/logging/log4j/simple/SimpleLoggerTest.java
b/log4j-api/src/test/java/org/apache/logging/log4j/simple/SimpleLoggerTest.java
index 63388f3..343a46c 100644
---
a/log4j-api/src/test/java/org/apache/logging/log4j/simple/SimpleLoggerTest.java
+++
b/log4j-api/src/test/java/org/apache/logging/log4j/simple/SimpleLoggerTest.java
@@ -30,8 +30,7 @@ import org.junit.jupiter.api.parallel.ResourceLock;
public class SimpleLoggerTest {
@RegisterExtension
- public static final LoggerContextFactoryExtension EXTENSION =
- new LoggerContextFactoryExtension(new
SimpleLoggerContextFactory());
+ public static final LoggerContextFactoryExtension EXTENSION = new
LoggerContextFactoryExtension(SimpleLoggerContextFactory.INSTANCE);
private final Logger logger = LogManager.getLogger("TestError");
diff --git
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
index 8649984..eee51cd 100644
---
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
+++
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
@@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
public class TestConfiguratorError {
@RegisterExtension
- static final LoggerContextFactoryExtension extension = new
LoggerContextFactoryExtension(new SimpleLoggerContextFactory());
+ static final LoggerContextFactoryExtension EXTENSION = new
LoggerContextFactoryExtension(SimpleLoggerContextFactory.INSTANCE);
@Test
public void testErrorNoClassLoader() throws Exception {