20
20
import javax .servlet .ServletRequestListener ;
21
21
import javax .servlet .http .HttpServletRequest ;
22
22
23
- import org .apache .commons .logging .Log ;
24
- import org .apache .commons .logging .LogFactory ;
25
-
26
23
import org .springframework .context .i18n .LocaleContextHolder ;
27
24
28
25
/**
@@ -51,9 +48,6 @@ public class RequestContextListener implements ServletRequestListener {
51
48
private static final String REQUEST_ATTRIBUTES_ATTRIBUTE =
52
49
RequestContextListener .class .getName () + ".REQUEST_ATTRIBUTES" ;
53
50
54
- /** Logger available to subclasses */
55
- protected final Log logger = LogFactory .getLog (getClass ());
56
-
57
51
58
52
public void requestInitialized (ServletRequestEvent requestEvent ) {
59
53
if (!(requestEvent .getServletRequest () instanceof HttpServletRequest )) {
@@ -65,9 +59,6 @@ public void requestInitialized(ServletRequestEvent requestEvent) {
65
59
request .setAttribute (REQUEST_ATTRIBUTES_ATTRIBUTE , attributes );
66
60
LocaleContextHolder .setLocale (request .getLocale ());
67
61
RequestContextHolder .setRequestAttributes (attributes );
68
- if (logger .isDebugEnabled ()) {
69
- logger .debug ("Bound request context to thread: " + request );
70
- }
71
62
}
72
63
73
64
public void requestDestroyed (ServletRequestEvent requestEvent ) {
@@ -85,9 +76,6 @@ public void requestDestroyed(ServletRequestEvent requestEvent) {
85
76
}
86
77
if (attributes != null ) {
87
78
attributes .requestCompleted ();
88
- if (logger .isDebugEnabled ()) {
89
- logger .debug ("Cleared thread-bound request context: " + requestEvent .getServletRequest ());
90
- }
91
79
}
92
80
}
93
81
0 commit comments