You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mbukosky <mb...@paypal.com> on 2017/09/12 15:23:11 UTC

Suppressing warning message in Artemis logs

Hi all,

I am trying to filter out a netting connection error (below). This error is
most likely being caused because of our custom load balance setup. This
error has no impact and is just bloating our log files. I would like to
filter out this message but I am running into issues with the JBoss logging
and need advice.

*12:51:09,079 ERROR [org.apache.activemq.artemis.core.client] AMQ214016:
Failed to create netty connection: java.nio.channels.ClosedChannelException
        at io.netty.handler.ssl.SslHandler.channelInactive(...)(Unknown
Source) [netty-all-4.1.9.Final.jar:4.1.9.Final]*

Ideally, I would like to filter out the error with the following
logging.properties changes

*# Console handler configuration
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
handler.CONSOLE.properties=autoFlush
handler.CONSOLE.level=DEBUG
handler.CONSOLE.autoFlush=true
handler.CONSOLE.formatter=PATTERN
handler.CONSOLE.filter=not(match("AMQ214016: Failed to create netty
connection: java\.nio\.channels\.ClosedChannelException"))

# File handler configuration
handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
handler.FILE.level=DEBUG
handler.FILE.properties=suffix,append,autoFlush,fileName
handler.FILE.suffix=.yyyy-MM-dd
handler.FILE.append=true
handler.FILE.autoFlush=true
handler.FILE.fileName=${artemis.instance}/log/artemis.log
handler.FILE.formatter=PATTERN
handler.FILE.filter=not(match("AMQ214016: Failed to create netty connection:
java\.nio\.channels\.ClosedChannelException"))

# Formatter pattern configuration
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
formatter.PATTERN.properties=pattern
formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n*

This however doesn't work because only the message (%s) is able to be
filtered. The exception (%E) isn't able to be filtered out. I don't like the
idea of filtering out a more generic message of *AMQ214016: Failed to create
netty connection*. 

I have been trying to look over google to figure out how to filter the
exception or filter on the class itself but I have not been able to find any
examples.

Any ideas?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Suppressing warning message in Artemis logs

Posted by Justin Bertram <jb...@redhat.com>.
Nice.  Do you have any code you could share on GitHub or anything as an
example?


Justin

On Thu, Sep 14, 2017 at 11:52 AM, mbukosky <mb...@paypal.com> wrote:

> For future reference, I was able to solve my problem by creating a custom
> LogFilter. This allowed me to access the exception information.
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>

Re: Suppressing warning message in Artemis logs

Posted by mbukosky <mb...@paypal.com>.
For future reference, I was able to solve my problem by creating a custom
LogFilter. This allowed me to access the exception information.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html