JBoss logging filter-spec configuration doesn't filter out based on MDC

Solution Unverified - Updated -

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(&quot;CORE.InstrumentDistributor&quot;)"/>
    <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.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.