1 Reply Latest reply on Jul 9, 2010 11:58 AM by David Lloyd

    jboss-logging.xml additivity flag in logger ignored

    Greg G Newbie

      Hi I'm using JBoss AS 6 M3 and i found problem.

      When I try use logger category with additivity flag set as false then it is ignored. Finally I always have log output on console and in 2 separate log files.

       

      Could anybody check it in own environment?

       

      PS. I use jboos build from sources - my last update is 2010-07-08.

       

      My logger with ignbore flag is :

       

        <logger category="test.logging.admin.LoggingAdmin" additivity="false">
            <level name="ALL"/>
            <handlers>
               <handler-ref name="myFILE"/>
            </handlers>
         </logger>

       

      and code is :


      static Logger logger = Logger.getLogger("test.logging.admin.LoggingAdmin");

      ....

      logger.trace(logger.getLevel() + " trace " + LoggingAdmin.now());
      logger.debug(logger.getLevel() + " debug " + LoggingAdmin.now());
      logger.info(logger.getLevel() + " info " + LoggingAdmin.now());
      logger.warn(logger.getLevel() + " warn " + LoggingAdmin.now());
      logger.error(logger.getLevel() + " error " + LoggingAdmin.now());
      logger.fatal(logger.getLevel() + " fatal " + LoggingAdmin.now());