Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
changes log messages from debug to warn
  • Loading branch information
jamescarr committed Nov 15, 2011
commit 5546ff5fc2c4cdd059871d31a9bf798f8fc8c473
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ protected void invokeErrorHandler(Throwable ex) {
if (this.errorHandler != null) {
this.errorHandler.handleError(ex);
} else if (logger.isDebugEnabled()) {
logger.debug("Execution of Rabbit message listener failed, and no ErrorHandler has been set.", ex);
logger.warn("Execution of Rabbit message listener failed, and no ErrorHandler has been set.", ex);
} else if (logger.isInfoEnabled()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not log under warn after testing for isInfoEnabled (or isDebugEnabled). Always log at the same level as if test.

simply replace both with a single

if (logger.isWarnEnabled() {
logger.warn(...., ex);
}

(See JMS AMLC)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just updated the commit range.

logger.info("Execution of Rabbit message listener failed, and no ErrorHandler has been set: "
logger.warn("Execution of Rabbit message listener failed, and no ErrorHandler has been set: "
+ ex.getClass() + ": " + ex.getMessage());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

You should remove this last else if{...} stanza; it will never be executed because the one above it will run.

Thanks.

}
Expand Down