JBoss logging filter-spec configuration doesn't filter out based on MDC
Issue
We've configured the "filter-spec" expression on our handler in the logging subsystem. The "filter-spec" refers to a value found in the MDC (Mapped Diagnostic Context). The filtering doesn't work however. The logging pattern is:
<file-handler name="INSTRUMENTS" autoflush="true">
<filter-spec value="match("CORE.InstrumentDistributor")"/>
<formatter>
<pattern-formatter pattern="%d %-5p [%c{1}] [%X{Thread}.%X{Num}|%X{MsgID}|%X{MDB}|%X{CompID}] %X{CompID} %m%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="instrument-distributor.log"/>
<append value="false"/>
</file-handler>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
