avoid early Log4J initialization (SPR-6288)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2398 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
2cc308174e
commit
d6b5b8dbf4
|
|
@ -20,9 +20,6 @@ import javax.servlet.ServletRequestEvent;
|
|||
import javax.servlet.ServletRequestListener;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
|
||||
/**
|
||||
|
|
@ -51,9 +48,6 @@ public class RequestContextListener implements ServletRequestListener {
|
|||
private static final String REQUEST_ATTRIBUTES_ATTRIBUTE =
|
||||
RequestContextListener.class.getName() + ".REQUEST_ATTRIBUTES";
|
||||
|
||||
/** Logger available to subclasses */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
public void requestInitialized(ServletRequestEvent requestEvent) {
|
||||
if (!(requestEvent.getServletRequest() instanceof HttpServletRequest)) {
|
||||
|
|
@ -65,9 +59,6 @@ public class RequestContextListener implements ServletRequestListener {
|
|||
request.setAttribute(REQUEST_ATTRIBUTES_ATTRIBUTE, attributes);
|
||||
LocaleContextHolder.setLocale(request.getLocale());
|
||||
RequestContextHolder.setRequestAttributes(attributes);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Bound request context to thread: " + request);
|
||||
}
|
||||
}
|
||||
|
||||
public void requestDestroyed(ServletRequestEvent requestEvent) {
|
||||
|
|
@ -85,9 +76,6 @@ public class RequestContextListener implements ServletRequestListener {
|
|||
}
|
||||
if (attributes != null) {
|
||||
attributes.requestCompleted();
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Cleared thread-bound request context: " + requestEvent.getServletRequest());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue