ARTEMIS-631 log invalid filter trace at DEBUG

This commit is contained in:
jbertram 2016-07-15 08:52:53 -05:00 committed by Martyn Taylor
parent 9df39ad569
commit 7a57503e1c
2 changed files with 9 additions and 3 deletions

View File

@ -78,7 +78,10 @@ public class FilterImpl implements Filter {
booleanExpression = SelectorParser.parse(filterStr.toString()); booleanExpression = SelectorParser.parse(filterStr.toString());
} }
catch (Throwable e) { catch (Throwable e) {
ActiveMQServerLogger.LOGGER.invalidFilter(e, filterStr); ActiveMQServerLogger.LOGGER.invalidFilter(filterStr);
if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
ActiveMQServerLogger.LOGGER.debug("Invalid filter", e);
}
throw ActiveMQMessageBundle.BUNDLE.invalidFilter(e, filterStr); throw ActiveMQMessageBundle.BUNDLE.invalidFilter(e, filterStr);
} }
return new FilterImpl(filterStr, booleanExpression); return new FilterImpl(filterStr, booleanExpression);
@ -105,7 +108,10 @@ public class FilterImpl implements Filter {
return result; return result;
} }
catch (Exception e) { catch (Exception e) {
ActiveMQServerLogger.LOGGER.invalidFilter(e, sfilterString); ActiveMQServerLogger.LOGGER.invalidFilter(sfilterString);
if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
ActiveMQServerLogger.LOGGER.debug("Invalid filter", e);
}
return false; return false;
} }
} }

View File

@ -1246,7 +1246,7 @@ public interface ActiveMQServerLogger extends BasicLogger {
@LogMessage(level = Logger.Level.ERROR) @LogMessage(level = Logger.Level.ERROR)
@Message(id = 224006, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT) @Message(id = 224006, value = "Invalid filter: {0}", format = Message.Format.MESSAGE_FORMAT)
void invalidFilter(@Cause Throwable t, SimpleString filter); void invalidFilter(SimpleString filter);
@LogMessage(level = Logger.Level.ERROR) @LogMessage(level = Logger.Level.ERROR)
@Message(id = 224007, value = "page subscription = {0} error={1}", format = Message.Format.MESSAGE_FORMAT) @Message(id = 224007, value = "page subscription = {0} error={1}", format = Message.Format.MESSAGE_FORMAT)