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

@@ -69,8 +69,8 @@ public class HeaderMethodArgumentResolver extends AbstractNamedValueMethodArgume
Object nativeHeaderValue = getNativeHeaderValue(message, name);
if (headerValue != null && nativeHeaderValue != null) {
if (logger.isWarnEnabled()) {
logger.warn("Message headers contain two values for the same header '" + name + "', " +
if (logger.isDebugEnabled()) {
logger.debug("Message headers contain two values for the same header '" + name + "', " +
"one in the top level header map and a second in the nested map with native headers. " +
"Using the value from top level map. " +
"Use 'nativeHeader.myHeader' to resolve to the value from the nested native header map.");

View File

@@ -344,8 +344,8 @@ public abstract class AbstractMethodMessageHandler<T>
}
this.handlerMethods.put(mapping, newHandlerMethod);
if (logger.isInfoEnabled()) {
logger.info("Mapped \"" + mapping + "\" onto " + newHandlerMethod);
if (logger.isTraceEnabled()) {
logger.trace("Mapped \"" + mapping + "\" onto " + newHandlerMethod);
}
for (String pattern : getDirectLookupDestinations(mapping)) {

View File

@@ -630,8 +630,8 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
* the TCP connection, failure to send a message, missed heartbeat, etc.
*/
protected void handleTcpConnectionFailure(String error, @Nullable Throwable ex) {
if (logger.isWarnEnabled()) {
logger.warn("TCP connection failure in session " + this.sessionId + ": " + error, ex);
if (logger.isInfoEnabled()) {
logger.info("TCP connection failure in session " + this.sessionId + ": " + error, ex);
}
try {
sendStompErrorFrameToClient(error);

View File

@@ -299,8 +299,8 @@ public class StompDecoder {
contentLength = headerAccessor.getContentLength();
}
catch (NumberFormatException ex) {
if (logger.isWarnEnabled()) {
logger.warn("Ignoring invalid content-length: '" + headerAccessor);
if (logger.isDebugEnabled()) {
logger.debug("Ignoring invalid content-length: '" + headerAccessor);
}
contentLength = null;
}

View File

@@ -97,8 +97,8 @@ public abstract class AbstractHeaderMapper<T> implements HeaderMapper<T> {
return null;
}
if (!type.isAssignableFrom(value.getClass())) {
if (logger.isWarnEnabled()) {
logger.warn("Skipping header '" + name + "'expected type [" + type + "], but got [" +
if (logger.isDebugEnabled()) {
logger.debug("Skipping header '" + name + "': expected type [" + type + "], but got [" +
value.getClass() + "]");
}
return null;