Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE

Issue: SPR-16946
This commit is contained in:
Juergen Hoeller
2018-07-20 15:05:13 +02:00
parent a410d90439
commit 9a43d2ec20
99 changed files with 461 additions and 486 deletions

View File

@@ -58,8 +58,8 @@ public class WebSocketAnnotationMethodMessageHandler extends SimpAnnotationMetho
if (context == null) {
return;
}
if (logger.isDebugEnabled()) {
logger.debug("Looking for @MessageExceptionHandler mappings: " + context);
if (logger.isTraceEnabled()) {
logger.trace("Looking for @MessageExceptionHandler mappings: " + context);
}
List<ControllerAdviceBean> beans = ControllerAdviceBean.findAnnotatedBeans(context);
AnnotationAwareOrderComparator.sort(beans);
@@ -76,7 +76,9 @@ public class WebSocketAnnotationMethodMessageHandler extends SimpAnnotationMetho
AnnotationExceptionHandlerMethodResolver resolver = new AnnotationExceptionHandlerMethodResolver(type);
if (resolver.hasExceptionMappings()) {
registerExceptionHandlerAdvice(bean, resolver);
logger.info("Detected @MessageExceptionHandler methods in " + bean);
if (logger.isTraceEnabled()) {
logger.trace("Detected @MessageExceptionHandler methods in " + bean);
}
}
}
}

View File

@@ -145,12 +145,12 @@ public class ServerEndpointExporter extends WebApplicationObjectSupport
ServerContainer serverContainer = getServerContainer();
Assert.state(serverContainer != null,
"No ServerContainer set. Most likely the server's own WebSocket ServletContainerInitializer " +
"has not run yet. Was the Spring ApplicationContext refreshed through a " +
"org.springframework.web.context.ContextLoaderListener, " +
"i.e. after the ServletContext has been fully initialized?");
"has not run yet. Was the Spring ApplicationContext refreshed through a " +
"org.springframework.web.context.ContextLoaderListener, " +
"i.e. after the ServletContext has been fully initialized?");
try {
if (logger.isInfoEnabled()) {
logger.info("Registering @ServerEndpoint class: " + endpointClass);
if (logger.isDebugEnabled()) {
logger.debug("Registering @ServerEndpoint class: " + endpointClass);
}
serverContainer.addEndpoint(endpointClass);
}
@@ -163,8 +163,8 @@ public class ServerEndpointExporter extends WebApplicationObjectSupport
ServerContainer serverContainer = getServerContainer();
Assert.state(serverContainer != null, "No ServerContainer set");
try {
if (logger.isInfoEnabled()) {
logger.info("Registering ServerEndpointConfig: " + endpointConfig);
if (logger.isDebugEnabled()) {
logger.debug("Registering ServerEndpointConfig: " + endpointConfig);
}
serverContainer.addEndpoint(endpointConfig);
}