Skip to content

Commit

Permalink
avoid early Log4J initialization (SPR-6288)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Nov 12, 2009
1 parent 613b4d1 commit f595b67
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
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;

/**
Expand Down Expand Up @@ -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)) {
Expand All @@ -65,9 +59,6 @@ public void requestInitialized(ServletRequestEvent requestEvent) {
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) {
Expand All @@ -85,9 +76,6 @@ public void requestDestroyed(ServletRequestEvent requestEvent) {
}
if (attributes != null) {
attributes.requestCompleted();
if (logger.isDebugEnabled()) {
logger.debug("Cleared thread-bound request context: " + requestEvent.getServletRequest());
}
}
}

Expand Down

0 comments on commit f595b67

Please sign in to comment.