1 Reply Latest reply on Apr 6, 2010 4:28 AM by Alexis Hassler

    TCLMCFilter does not work with AsyncAppender

    Alexis Hassler Apprentice

      Hi,

       

      I followed http://community.jboss.org/wiki/SeparatingApplicationLogs to use the new TCLMCFilter in JBoss 5.1.0. It works fine when I associate the appender directly to the root logger. When I associate the appender to a AsyncAppender, there is no more log.

       

      Here is my conf :

       

         <appender name="SWFILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
            <param name="File" value="${jboss.server.log.dir}/swmsg.log"/>
            <param name="Append" value="true"/>
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>
            <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
            </layout>
      
            <filter class="org.jboss.logging.filter.TCLMCFilter">
               <param name="AcceptOnMatch" value="true"/>
               <param name="DeployURL" value="swmsg-app.ear"/>
            </filter>
            <filter class="org.apache.log4j.varia.DenyAllFilter"></filter>
         </appender>
      
         <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <appender-ref ref="FILE"/>
           <appender-ref ref="SWFILE"/>
         </appender>
      
         <root>
            <priority value="${jboss.server.log.threshold}"/>
            <appender-ref ref="ASYNC"/>
         </root>