Date: 2004-06-25T14:02:14
   Editor: 69.111.157.225 <>
   Wiki: Apache Geronimo Wiki
   Page: Logging
   URL: http://wiki.apache.org/geronimo/Logging

   no comment

New Page:

= Logging =

Geronimo logging is controlled by the GBeans declared in the system-plan.xml 
file.  Unfortunately, the current admin console does not allow us to change 
configuration attributes, so I have temporarily added support for a log4j.xml 
configuration file.  If you wish to modify our default logging configuration, 
simply place a log4j.xml file in the var/log directory of your geronimo build.  
Documentation on log4j and the log4j.xml file can be found 
[http://logging.apache.org/log4j/docs/documentation.html here].

The following is a the equivlent of our default logging configuration in xml 
format:
    {{{
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration>
    <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
        <param name="Threshold" value="INFO"/>
        <param name="Target" value="System.out"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] 
%m%n"/>
        </layout>
    </appender>

    <appender name="DailyRollingFileAppender" 
class="org.apache.log4j.DailyRollingFileAppender">
        <param name="Threshold" value="DEBUG"/>
        <param name="Append" value="true"/>
        <!-- NOTE: this file is relative to the directioy from which Geronimo 
-->
        <!-- was started, which is not necessairly the Geronimo home directory 
-->
        <param name="File" value="yourLogFile.log"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] 
%m%n"/>
        </layout>
    </appender>

    <root>
        <priority value ="info"/>
        <appender-ref ref="ConsoleAppender"/>
        <appender-ref ref="DailyRollingFileAppender"/>
    </root>
</log4j:configuration>
}}}

Reply via email to