java - DEBUG logs are not printing -
i developing web application, in using log4j. running application in jboss-4.2.2ga server. problem trying display debug logs in console , file not printing debug logs.
this jboss-log4j.xml file
<?xml version="1.0" encoding="utf-8"?> <!doctype log4j:configuration system "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <appender name="file" class="org.jboss.logging.appender.dailyrollingfileappender"> <errorhandler class="org.jboss.logging.util.onlyonceerrorhandler"/> <param name="file" value="/temp_logs/server.log"/> <param name="append" value="false"/> <param name="datepattern" value="'.'yyyy-mm-dd"/> <layout class="org.apache.log4j.patternlayout"> <param name="conversionpattern" value="%d %-5p [%c] %m%n"/> </layout> </appender> <appender name="console" class="org.apache.log4j.consoleappender"> <errorhandler class="org.jboss.logging.util.onlyonceerrorhandler"/> <param name="target" value="system.out"/> <param name="threshold" value="info"/> <layout class="org.apache.log4j.patternlayout"> <param name="conversionpattern" value="%d{absolute} %-5p [%c{1}] %m%n"/> </layout> </appender> <category name="org.apache"> <priority value="info"/> </category> <category name="jacorb"> <priority value="warn"/> </category> <category name="org.jgroups"> <priority value="warn"/> </category> <category name="org.quartz"> <priority value="info"/> </category> <category name="org.jboss.management"> <priority value="info"/> </category> <category name="org.jboss.serial"> <priority value="info"/> </category> <root> <appender-ref ref="console"/> <appender-ref ref="file"/> </root> </log4j:configuration>
my java class
public class test { logger logger = logger.getlogger(test.class.getname()); logger.info("this info"); logger.debug("this debug"); }
i getting following output only...
this info
please me....
thanks & regards
try add config file:
<category name="your.class.package"> <priority value="debug"/> </category>
Comments
Post a Comment