Merge pull request #497 from jbonofre/AMQ-7347

[AMQ-7347] Don't log error in case of topic subscription failure (use debug)
This commit is contained in:
Jean-Baptiste Onofré 2020-03-04 17:56:30 +01:00 committed by GitHub
commit 93f8ea1b8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()) {