7 Replies Latest reply on Oct 12, 2010 2:04 AM by jaikiran pai

    Jboss log4j level dynamic switch

    Pradeep Sreekumar Newbie

      Hi All,

      I am having an issue with switching the log level dynamically.I tried using log4j xml and following is the log4j configuration.

      <appender name="FILE" class="org.apache.log4j.RollingFileAppender">


            <param name="File" value="${jboss.server.log.dir}/shcapiTest.log"/>
            <param name="Threshold" value="INFO"/>
            <param name="Append" value="false"/>


            <layout class="org.apache.log4j.PatternLayout">
               <!-- The default pattern: Date Priority [Category] Message\n -->
               <param name="ConversionPattern" value="%c [%d] %5p %X{token} %C.%M - %m%n"/>

      <category name="com.test.api" additivity="false">
              <appender-ref ref="FILE"/>

            <appender-ref ref="FILE"/>


      Also RefreshPeriod is configured in jboss-service.xml.

      But changing the threshold level from INFO to DEBUG is not printing my DEBUG logs


      This is how i access the logger


      logger.debug("Testing debug");

      Any issue with this configuration.?