diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java index 9cacff0f12..77bf7c5eb8 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java @@ -78,7 +78,10 @@ public class FilterImpl implements Filter { booleanExpression = SelectorParser.parse(filterStr.toString()); } 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); } return new FilterImpl(filterStr, booleanExpression); @@ -105,7 +108,10 @@ public class FilterImpl implements Filter { return result; } catch (Exception e) { - ActiveMQServerLogger.LOGGER.invalidFilter(e, sfilterString); + ActiveMQServerLogger.LOGGER.invalidFilter(sfilterString); + if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { + ActiveMQServerLogger.LOGGER.debug("Invalid filter", e); + } return false; } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java index b9ac8a483b..c2c2e0a6fc 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java @@ -1246,7 +1246,7 @@ public interface ActiveMQServerLogger extends BasicLogger { @LogMessage(level = Logger.Level.ERROR) @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) @Message(id = 224007, value = "page subscription = {0} error={1}", format = Message.Format.MESSAGE_FORMAT)