Created
June 23, 2014 08:37
-
-
Save yanhua365/58ed92e0686dd5aec38a to your computer and use it in GitHub Desktop.
当出现异常的时候,根据是否是debug来决定是否打印异常
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringBuilder msg = new StringBuilder(); | |
msg.append("Could not refresh JMS Connection for destination '"); | |
msg.append(getDestinationDescription()).append("' - retrying in "); | |
msg.append(this.recoveryInterval).append(" ms. Cause: "); | |
msg.append(ex instanceof JMSException ? JmsUtils.buildExceptionMessage((JMSException) ex) : ex.getMessage()); | |
if (logger.isDebugEnabled()) { | |
logger.error(msg, ex); | |
} | |
else { | |
logger.error(msg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment