0 Replies Latest reply on Jul 26, 2012 8:45 AM by Patrick Ruckstuhl

    Issue specifying specific log level for Loggers using logging.properties (JBoss 7.1.2)

    Patrick Ruckstuhl Newbie

      The new jboss provides the feature that allows to have per deployment logging configuration (see https://issues.jboss.org/browse/AS7-514)

       

      I tried creating a logging.properties file and this works fine for configuring a different log file or a different global level.

       

      What doesn't seem to work (and I probably just did a stupid mistake which I can't find), is to specify a different log level for a certain category

       

       

      neo.ear/META-INF/logging.properties

       

      loggers=NeoTimer
      
      logger.level=ERROR
      logger.handlers=CONSOLE, FILE
      
      logger.NeoTimer.level=INFO
      
      # Console handler configuration
      handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
      handler.CONSOLE.level=INFO
      handler.CONSOLE.properties=autoFlush
      handler.CONSOLE.autoFlush=true
      handler.CONSOLE.formatter=PATTERN
      
      # File handler configuration
      handler.FILE=org.jboss.logmanager.handlers.FileHandler
      handler.FILE.level=INFO
      handler.FILE.properties=autoFlush,fileName
      handler.FILE.autoFlush=true
      handler.FILE.fileName=/neo/apps/jboss/standalone/log/server.log
      handler.FILE.formatter=PATTERN
      
      # The log format pattern for both logs
      formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
      formatter.PATTERN.properties=pattern
      formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n
      

       

      Logging happens jusing slf4j and is in neo.ear/lib/neo-common.jar

       

      private static final Logger DEFAULT_LOGGER = LoggerFactory.getLogger("NeoTimer");
      
      
      logger.info("my message");
      

       

       

      Changing global stuff such as the handlers or the global levels works (so the log file is picked up) but the configuration for the NeoTimer does not work.