1 Reply Latest reply on Mar 5, 2011 12:56 PM by sewatech

    Filter on logger does not filter

    sewatech

      Hi all,

       

      I'm just trying to configure logging in JBoss AS 6. I've not found much documentation on it, so I'm using the jboss-logging-6_0.xsd.

       

      I wanted to use filtering. It works fine on handler. With the following configuration, nothing is logged in Console (it is just an example !) :

       

         <console-handler name="CONSOLE" autoflush="true" target="System.out"

            <error-manager>

               <only-once/>

            </error-manager>

            <level name="INFO"/>

            <filter>

               <deny/>

            </filter>

            <formatter>

               <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>

            </formatter>

         </console-handler>

       

      When I'm using the same filter on a logger element, the messages from that logger are logged.

       

         <logger category="org.jboss.bootstrap">

            <filter>

               <deny/>

            </filter>

         </logger>

       

      Can I really filter on logger element ? What is wrong in my config ?

       

      PS : I joined the whole config file.

        • 1. Filter on logger does not filter
          sewatech

          I just find out why my filter does not work...

           

          In fact, if I put a filter on another logger, it works. I think that because org.jboss.bootstrap.impl.base.server.AbstractServer is initialized before the LoggingService, its filter is not reinitialzed. Handlers and level are reinitialized but not filter.

           

          Not sure wether it is a bug or not. Should I post a JIRA on it ?