[jboss-dev-forums] [JBoss Web Development] - Jboss log4j level dynamic switch
Pradeep Sreekumar
do-not-reply at jboss.com
Mon Oct 11 01:01:29 EDT 2010
Pradeep Sreekumar [http://community.jboss.org/people/pradeepsreekumar] created the discussion
"Jboss log4j level dynamic switch"
To view the discussion, visit: http://community.jboss.org/message/565715#565715
--------------------------------------------------------------
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"/>
</layout>
</appender>
<category name="com.test.api" additivity="false">
<appender-ref ref="FILE"/>
</category>
<root>
<appender-ref ref="FILE"/>
</root>
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
.getLogger("com.test.api");
logger.debug("Testing debug");
Any issue with this configuration.?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/565715#565715]
Start a new discussion in JBoss Web Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2112]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101011/7d8c445c/attachment.html
More information about the jboss-dev-forums
mailing list