@@ -516,9 +516,9 @@ public void setApplicationContext(ApplicationContext applicationContext) {
516
516
*/
517
517
@ Override
518
518
protected final void initServletBean () throws ServletException {
519
- getServletContext ().log ("Initializing Spring FrameworkServlet '" + getServletName () + "'" );
519
+ getServletContext ().log ("Initializing Spring " + getClass (). getSimpleName () + " '" + getServletName () + "'" );
520
520
if (logger .isInfoEnabled ()) {
521
- logger .info ("FrameworkServlet '" + getServletName () + "': initialization started " );
521
+ logger .info ("Initializing Servlet '" + getServletName () + "'" );
522
522
}
523
523
long startTime = System .currentTimeMillis ();
524
524
@@ -540,9 +540,7 @@ protected final void initServletBean() throws ServletException {
540
540
}
541
541
542
542
if (logger .isInfoEnabled ()) {
543
- long elapsedTime = System .currentTimeMillis () - startTime ;
544
- logger .info ("FrameworkServlet '" + getServletName () + "': initialization completed in " +
545
- elapsedTime + " ms" );
543
+ logger .info ("Completed initialization in " + (System .currentTimeMillis () - startTime ) + " ms" );
546
544
}
547
545
}
548
546
@@ -600,10 +598,6 @@ protected WebApplicationContext initWebApplicationContext() {
600
598
// Publish the context as a servlet context attribute.
601
599
String attrName = getServletContextAttributeName ();
602
600
getServletContext ().setAttribute (attrName , wac );
603
- if (logger .isTraceEnabled ()) {
604
- logger .trace ("Published WebApplicationContext of servlet '" + getServletName () +
605
- "' as ServletContext attribute [" + attrName + "]" );
606
- }
607
601
}
608
602
609
603
return wac ;
@@ -650,11 +644,6 @@ protected WebApplicationContext findWebApplicationContext() {
650
644
*/
651
645
protected WebApplicationContext createWebApplicationContext (@ Nullable ApplicationContext parent ) {
652
646
Class <?> contextClass = getContextClass ();
653
- if (logger .isTraceEnabled ()) {
654
- logger .trace ("Servlet '" + getServletName () +
655
- "' will create custom WebApplicationContext context of class '" +
656
- contextClass .getName () + "'" + ", parent context [" + parent + "]" );
657
- }
658
647
if (!ConfigurableWebApplicationContext .class .isAssignableFrom (contextClass )) {
659
648
throw new ApplicationContextException (
660
649
"Fatal initialization error in servlet with name '" + getServletName () +
@@ -1071,19 +1060,13 @@ private void initContextHolders(HttpServletRequest request,
1071
1060
if (requestAttributes != null ) {
1072
1061
RequestContextHolder .setRequestAttributes (requestAttributes , this .threadContextInheritable );
1073
1062
}
1074
- if (logger .isTraceEnabled ()) {
1075
- logger .trace ("Bound request context to thread: " + request );
1076
- }
1077
1063
}
1078
1064
1079
1065
private void resetContextHolders (HttpServletRequest request ,
1080
1066
@ Nullable LocaleContext prevLocaleContext , @ Nullable RequestAttributes previousAttributes ) {
1081
1067
1082
1068
LocaleContextHolder .setLocaleContext (prevLocaleContext , this .threadContextInheritable );
1083
1069
RequestContextHolder .setRequestAttributes (previousAttributes , this .threadContextInheritable );
1084
- if (logger .isTraceEnabled ()) {
1085
- logger .trace ("Cleared thread-bound request context: " + request );
1086
- }
1087
1070
}
1088
1071
1089
1072
private void logResult (HttpServletRequest request , HttpServletResponse response ,
0 commit comments