Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
Issue: SPR-16946
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -162,7 +162,7 @@ public class DefaultJmsListenerContainerFactory
|
||||
if (this.backOff != null) {
|
||||
container.setBackOff(this.backOff);
|
||||
if (this.recoveryInterval != null) {
|
||||
logger.warn("Ignoring recovery interval in DefaultJmsListenerContainerFactory in favor of BackOff");
|
||||
logger.info("Ignoring recovery interval in DefaultJmsListenerContainerFactory in favor of BackOff");
|
||||
}
|
||||
}
|
||||
else if (this.recoveryInterval != null) {
|
||||
|
||||
@@ -345,8 +345,8 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||
if (this.startedCount > 0) {
|
||||
this.connection.start();
|
||||
}
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Established shared JMS Connection: " + this.connection);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Established shared JMS Connection: " + this.connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||
*/
|
||||
@Override
|
||||
public void onException(JMSException ex) {
|
||||
logger.warn("Encountered a JMSException - resetting the underlying JMS Connection", ex);
|
||||
logger.info("Encountered a JMSException - resetting the underlying JMS Connection", ex);
|
||||
resetConnection();
|
||||
}
|
||||
|
||||
|
||||
@@ -875,7 +875,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
|
||||
}
|
||||
if (ex instanceof SharedConnectionNotInitializedException) {
|
||||
if (!alreadyRecovered) {
|
||||
logger.info("JMS message listener invoker needs to establish shared Connection");
|
||||
logger.debug("JMS message listener invoker needs to establish shared Connection");
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -943,7 +943,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
|
||||
Connection con = createConnection();
|
||||
JmsUtils.closeConnection(con);
|
||||
}
|
||||
logger.info("Successfully refreshed JMS Connection");
|
||||
logger.debug("Successfully refreshed JMS Connection");
|
||||
break;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
||||
@@ -236,8 +236,8 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
invokeExceptionListener(ex);
|
||||
|
||||
// Now try to recover the shared Connection and all consumers...
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Trying to recover from JMS Connection exception: " + ex);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Trying to recover from JMS Connection exception: " + ex);
|
||||
}
|
||||
try {
|
||||
synchronized (this.consumersMonitor) {
|
||||
@@ -246,7 +246,7 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
}
|
||||
refreshSharedConnection();
|
||||
initializeConsumers();
|
||||
logger.info("Successfully refreshed JMS Connection");
|
||||
logger.debug("Successfully refreshed JMS Connection");
|
||||
}
|
||||
catch (JMSException recoverEx) {
|
||||
logger.debug("Failed to recover JMS Connection", recoverEx);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -184,8 +184,8 @@ public class JmsInvokerServiceExporter extends RemoteInvocationBasedExporter
|
||||
@Nullable
|
||||
protected RemoteInvocation onInvalidRequest(Message requestMessage) throws JMSException {
|
||||
if (this.ignoreInvalidRequests) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Invalid request message will be discarded: " + requestMessage);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Invalid request message will be discarded: " + requestMessage);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
jmsMessage.setJMSCorrelationID((String) jmsCorrelationId);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to set JMSCorrelationID - skipping", ex);
|
||||
logger.debug("Failed to set JMSCorrelationID - skipping", ex);
|
||||
}
|
||||
}
|
||||
Destination jmsReplyTo = getHeaderIfAvailable(headers, JmsHeaders.REPLY_TO, Destination.class);
|
||||
@@ -80,7 +80,7 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
jmsMessage.setJMSReplyTo(jmsReplyTo);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to set JMSReplyTo - skipping", ex);
|
||||
logger.debug("Failed to set JMSReplyTo - skipping", ex);
|
||||
}
|
||||
}
|
||||
String jmsType = getHeaderIfAvailable(headers, JmsHeaders.TYPE, String.class);
|
||||
@@ -89,7 +89,7 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
jmsMessage.setJMSType(jmsType);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to set JMSType - skipping", ex);
|
||||
logger.debug("Failed to set JMSType - skipping", ex);
|
||||
}
|
||||
}
|
||||
Set<String> headerNames = headers.keySet();
|
||||
@@ -108,8 +108,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
"' since it cannot be set by client");
|
||||
}
|
||||
}
|
||||
else if (logger.isWarnEnabled()) {
|
||||
logger.warn("Failed to map message header '" + headerName + "' to JMS property", ex);
|
||||
else if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failed to map message header '" + headerName + "' to JMS property", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,8 +117,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Error occurred while mapping from MessageHeaders to JMS properties", ex);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Error occurred while mapping from MessageHeaders to JMS properties", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSCorrelationID property - skipping", ex);
|
||||
logger.debug("Failed to read JMSCorrelationID property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
Destination destination = jmsMessage.getJMSDestination();
|
||||
@@ -143,21 +143,21 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSDestination property - skipping", ex);
|
||||
logger.debug("Failed to read JMSDestination property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
int deliveryMode = jmsMessage.getJMSDeliveryMode();
|
||||
headers.put(JmsHeaders.DELIVERY_MODE, deliveryMode);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSDeliveryMode property - skipping", ex);
|
||||
logger.debug("Failed to read JMSDeliveryMode property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
long expiration = jmsMessage.getJMSExpiration();
|
||||
headers.put(JmsHeaders.EXPIRATION, expiration);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSExpiration property - skipping", ex);
|
||||
logger.debug("Failed to read JMSExpiration property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
String messageId = jmsMessage.getJMSMessageID();
|
||||
@@ -166,13 +166,13 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSMessageID property - skipping", ex);
|
||||
logger.debug("Failed to read JMSMessageID property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
headers.put(JmsHeaders.PRIORITY, jmsMessage.getJMSPriority());
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSPriority property - skipping", ex);
|
||||
logger.debug("Failed to read JMSPriority property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
Destination replyTo = jmsMessage.getJMSReplyTo();
|
||||
@@ -181,13 +181,13 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSReplyTo property - skipping", ex);
|
||||
logger.debug("Failed to read JMSReplyTo property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
headers.put(JmsHeaders.REDELIVERED, jmsMessage.getJMSRedelivered());
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSRedelivered property - skipping", ex);
|
||||
logger.debug("Failed to read JMSRedelivered property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
String type = jmsMessage.getJMSType();
|
||||
@@ -196,13 +196,13 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSType property - skipping", ex);
|
||||
logger.debug("Failed to read JMSType property - skipping", ex);
|
||||
}
|
||||
try {
|
||||
headers.put(JmsHeaders.TIMESTAMP, jmsMessage.getJMSTimestamp());
|
||||
}
|
||||
catch (Exception ex) {
|
||||
logger.info("Failed to read JMSTimestamp property - skipping", ex);
|
||||
logger.debug("Failed to read JMSTimestamp property - skipping", ex);
|
||||
}
|
||||
|
||||
Enumeration<?> jmsPropertyNames = jmsMessage.getPropertyNames();
|
||||
@@ -214,8 +214,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
headers.put(headerName, jmsMessage.getObjectProperty(propertyName));
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Error occurred while mapping JMS property '" + propertyName +
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Error occurred while mapping JMS property '" + propertyName +
|
||||
"' to Message header", ex);
|
||||
}
|
||||
}
|
||||
@@ -223,8 +223,8 @@ public class SimpleJmsHeaderMapper extends AbstractHeaderMapper<Message> impleme
|
||||
}
|
||||
}
|
||||
catch (JMSException ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Error occurred while mapping from JMS properties to MessageHeaders", ex);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Error occurred while mapping from JMS properties to MessageHeaders", ex);
|
||||
}
|
||||
}
|
||||
return new MessageHeaders(headers);
|
||||
|
||||
Reference in New Issue
Block a user