You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/01/12 14:22:45 UTC
(logging-log4j-jakarta) branch main updated: Remove redundant `AsyncLoggerContext#setUseThreadLocals()` usage
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-jakarta.git
The following commit(s) were added to refs/heads/main by this push:
new 114fb62 Remove redundant `AsyncLoggerContext#setUseThreadLocals()` usage
114fb62 is described below
commit 114fb626561496b21bd541c0069409bea9302374
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Fri Jan 12 15:23:19 2024 +0100
Remove redundant `AsyncLoggerContext#setUseThreadLocals()` usage
---
.../java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java | 4 ----
1 file changed, 4 deletions(-)
diff --git a/log4j-jakarta-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java b/log4j-jakarta-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
index 22dcfe4..bae575d 100644
--- a/log4j-jakarta-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
+++ b/log4j-jakarta-web/src/main/java/org/apache/logging/log4j/web/Log4jWebInitializerImpl.java
@@ -31,7 +31,6 @@ import java.util.concurrent.TimeUnit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.AbstractLifeCycle;
import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.async.AsyncLoggerContext;
import org.apache.logging.log4j.core.config.Configurator;
import org.apache.logging.log4j.core.impl.ContextAnchor;
import org.apache.logging.log4j.core.impl.Log4jContextFactory;
@@ -111,9 +110,6 @@ final class Log4jWebInitializerImpl extends AbstractLifeCycle implements Log4jWe
} else {
this.initializeNonJndi(location);
}
- if (this.loggerContext instanceof AsyncLoggerContext) {
- ((AsyncLoggerContext) this.loggerContext).setUseThreadLocals(false);
- }
this.servletContext.setAttribute(CONTEXT_ATTRIBUTE, this.loggerContext);
super.setStarted();