logger filter-spec does not suppress exceptions in the log in EAP 6
Issue
A web-application is running on JBoss, in the case of an exception it should be written to a file using a file-handler, however, not every exception should be saved. For this I wanted to use the filter-spec of the file-handlers.
<file-handler name="EXCEPTION-FILE" autoflush="true">
<level name="ERROR"></level>
<filter-spec value="not(match("MyCustomException"))"></filter>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"></pattern>
</formatter>
<file path="/var/log/jboss/mylogfile.log"></file>
<append value="true"></append>
</file-handler>
This configuration should filter out all MyCustomException, however they are still being written to the file.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.