Skip to content

Commit f595b67

Browse files
committed
avoid early Log4J initialization (SPR-6288)
1 parent 613b4d1 commit f595b67

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

org.springframework.web/src/main/java/org/springframework/web/context/request/RequestContextListener.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import javax.servlet.ServletRequestListener;
2121
import javax.servlet.http.HttpServletRequest;
2222

23-
import org.apache.commons.logging.Log;
24-
import org.apache.commons.logging.LogFactory;
25-
2623
import org.springframework.context.i18n.LocaleContextHolder;
2724

2825
/**
@@ -51,9 +48,6 @@ public class RequestContextListener implements ServletRequestListener {
5148
private static final String REQUEST_ATTRIBUTES_ATTRIBUTE =
5249
RequestContextListener.class.getName() + ".REQUEST_ATTRIBUTES";
5350

54-
/** Logger available to subclasses */
55-
protected final Log logger = LogFactory.getLog(getClass());
56-
5751

5852
public void requestInitialized(ServletRequestEvent requestEvent) {
5953
if (!(requestEvent.getServletRequest() instanceof HttpServletRequest)) {
@@ -65,9 +59,6 @@ public void requestInitialized(ServletRequestEvent requestEvent) {
6559
request.setAttribute(REQUEST_ATTRIBUTES_ATTRIBUTE, attributes);
6660
LocaleContextHolder.setLocale(request.getLocale());
6761
RequestContextHolder.setRequestAttributes(attributes);
68-
if (logger.isDebugEnabled()) {
69-
logger.debug("Bound request context to thread: " + request);
70-
}
7162
}
7263

7364
public void requestDestroyed(ServletRequestEvent requestEvent) {
@@ -85,9 +76,6 @@ public void requestDestroyed(ServletRequestEvent requestEvent) {
8576
}
8677
if (attributes != null) {
8778
attributes.requestCompleted();
88-
if (logger.isDebugEnabled()) {
89-
logger.debug("Cleared thread-bound request context: " + requestEvent.getServletRequest());
90-
}
9179
}
9280
}
9381

0 commit comments

Comments
 (0)