[AMQ-7347] Don't log error in case of topic subscription failure. It's useless as the JMX exception is thrown and pollute the log.

This commit is contained in:
jbonofre 2020-03-04 07:22:10 +01:00
parent 372a75fe82
commit 3c302dce33
2 changed files with 6 additions and 2 deletions

View File

@ -369,7 +369,7 @@ public class TopicRegion extends AbstractRegion {
answer.init();
return answer;
} catch (Exception e) {
LOG.error("Failed to create TopicSubscription ", e);
LOG.debug("Failed to create TopicSubscription ", e);
JMSException jmsEx = new JMSException("Couldn't create TopicSubscription");
jmsEx.setLinkedException(e);
throw jmsEx;

View File

@ -257,7 +257,11 @@ public class ProtocolConverter {
if (command == null) {
LOG.warn("Exception occurred while processing a command: {}", exception.toString());
} else {
LOG.warn("Exception occurred processing: {} -> {}", safeGetAction(command), exception.toString());
if (exception instanceof JMSException) {
LOG.warn("Exception occurred for client {} ({}) processing: {} -> {} ({})", connectionInfo.getClientId(), connectionInfo.getClientIp(), safeGetAction(command), exception.toString(), ((JMSException) exception).getLinkedException().toString());
} else {
LOG.warn("Exception occurred for client {} ({}) processing: {} -> {}", connectionInfo.getClientId(), connectionInfo.getClientIp(), safeGetAction(command), exception.toString());
}
}
if (LOG.isDebugEnabled()) {