[JBossCache] - Re: unable to configure logging
by jaikiran
1)As per your setting:
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <param name="Threshold" value="FATAL"/>
| <param name="Target" value="System.out"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
The threshold attribute of the console appender has been set to FATAL, which means that anything lesser than this(i.e. debug, info etc...) will NOT be logged to the console.
Change it to:
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <param name="Threshold" value="DEBUG"/>
| <param name="Target" value="System.out"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
2) As per your setting:
<category name="org.jboss.cache">
| <priority value="FATAL" class="org.jboss.logging.XLevel"/>
| </category>
Again, anything below FATAL level logged by from the org.jboss.cache package hierarchy will NOT be logged. Change this to
<category name="org.jboss.cache">
| <priority value="DEBUG"/>
| </category>
Same is the case with org.jgroups. Change it to:
<category name="org.jgroups">
| <priority value="DEBUG"/>
| </category>
3)
anonymous wrote : The output was catched by redirecting output of stderr (a DOS console) to a file.
As per the above settings, all the logs will be generated to stdout and NOT to stderr. So at all you want to redirect the logs then you should redirect it from stdout
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960315#3960315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960315
19 years, 9 months
[JBossCache] - Re: unable to configure logging
by matabo
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Log4j Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <!-- $Id: log4j.xml,v 1.5 2005/06/09 15:54:45 bela Exp $ -->
|
| <!--
| | For more configuration infromation and examples see the Jakarta Log4j
| | owebsite: http://jakarta.apache.org/log4j
| -->
|
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
|
| <!-- ================================= -->
| <!-- Preserve messages in a local file -->
| <!-- ================================= -->
|
| <!-- A time/date based rolling appender -->
| <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
| <param name="File" value="test.log"/>
| <param name="Append" value="false"/>
|
| <!-- Rollover at midnight each day -->
| <param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
| <!-- Rollover at the top of each hour
| <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
| -->
| <param name="Threshold" value="DEBUG"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
|
| <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
| <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
| -->
| </layout>
| </appender>
|
| <!-- ============================== -->
| <!-- Append messages to the console -->
| <!-- ============================== -->
|
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <param name="Threshold" value="FATAL"/>
| <param name="Target" value="System.out"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
|
|
| <!-- ================ -->
| <!-- Limit categories -->
| <!-- ================ -->
|
| <!-- Limit JBoss categories to INFO
| <category name="org.jboss">
| <priority value="INFO" class="org.jboss.logging.XLevel"/>
| </category>
| -->
|
| <!-- Increase the priority threshold for the DefaultDS category
| <category name="DefaultDS">
| <priority value="FATAL"/>
| </category>
| -->
|
| <!-- Decrease the priority threshold for the org.jboss.varia category
| <category name="org.jboss.varia">
| <priority value="DEBUG"/>
| </category>
| -->
|
| <!--
| | An example of enabling the custom TRACE level priority that is used
| | by the JBoss internals to diagnose low level details. This example
| | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
| | subpackages. This will produce A LOT of logging output.
| <category name="org.jboss.system">
| <priority value="TRACE" class="org.jboss.logging.XLevel"/>
| </category>
| -->
|
| <category name="org.jboss.cache">
| <priority value="FATAL" class="org.jboss.logging.XLevel"/>
| </category>
|
| <category name="org.jboss.tm">
| <priority value="DEBUG" class="org.jboss.logging.XLevel"/>
| </category>
|
| <category name="org.jgroups">
| <priority value="FATAL"/>
| </category>
|
| <!-- ======================= -->
| <!-- Setup the Root category -->
| <!-- ======================= -->
|
| <root>
| <appender-ref ref="CONSOLE"/>
| <!-- <appender-ref ref="FILE"/>-->
| </root>
|
| </log4j:configuration>
|
The output was catched by redirecting output of stderr (a DOS console) to a file.
regards
matabo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960310#3960310
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960310
19 years, 9 months