Geronimo_MoinMoin_wiki > Logging
Added by Confluence Administrator, last edited by Confluence Administrator on Aug 02, 2006

Logging

Geronimo

Geronimo logging is configured by three files:

  • var/log/client-log4j.properties
  • var/log/deployer-log4j.properties
  • var/log/server-log4j.properties

Most likely you'll want to modify the server's configuration which is server-log4j.properties. It contains a couple of examples, but for complex changes you'll probably want to learn more about log4j at http://logging.apache.org/log4j/docs/.

If you prefer XML, or want Geronimo to read its log configuration files from a different place then you can hack modules/assembly/src/plan/system-plan.xml and rebuild Geronimo. If you would like to use fully-qualified pathnames (like I've done in the example) make sure you're using source code that's newer than January 5, 2005.

Look for the gbean element whose name attribute value is "geronimo.system:role=Logger". For example:

  • <!-- Logging service -->
    <gbean name="geronimo.system:role=Logger" class="org.apache.geronimo.system.logging.log4j.Log4jService">
        <attribute name="configurationFile">/etc/geronimo/log4j.xml</attribute>
        <attribute name="refreshPeriod">60</attribute>
        <reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
    </gbean>
    

This will use /etc/geronimo/log4j.xml instead of the default.

Jetty

Jetty logs http requests to var/log by default as well, you can move these by hacking modules/assembly/src/plan/j2ee-server-plan.xml. For example:

  • <gbean name="geronimo.server:type=RequestLog,container=Jetty" class="org.apache.geronimo.jetty.requestlog.NCSARequestLog">
        <reference name="JettyContainer">geronimo.server:type=WebContainer,container=Jetty</reference>
        <reference name="ServerInfo">geronimo.system:role=ServerInfo</reference>
        <attribute name="filename">/var/log/apache/jetty_yyyy_mm_dd.log</attribute>
        <attribute name="logDateFormat">dd/MMM/yyyy:HH:mm:ss ZZZ</attribute>
        <attribute name="logTimeZone">GMT</attribute>
    </gbean>
    

This will tell Jetty to put its server logs in the directory where Apache httpd puts them (on Debian systems).

HOWL

HOWL gets its log configuration from modules/assembly/src/plan/j2ee-server-plan.xml as well.

  • <gbean name="geronimo.server:type=HOWLTransactionLog" class="org.apache.geronimo.transaction.log.HOWLLog">
        <attribute name="bufferClassName">org.objectweb.howl.log.BlockLogBuffer</attribute>
        <attribute name="bufferSizeKBytes">32</attribute>
        <attribute name="checksumEnabled">true</attribute>
        <attribute name="flushSleepTimeMilliseconds">50</attribute>
        <attribute name="logFileDir">/var/log/txlog</attribute>
        <attribute name="logFileExt">log</attribute>
        <attribute name="logFileName">howl</attribute>
        <attribute name="maxBlocksPerFile">-1</attribute>
        <attribute name="maxBuffers">0</attribute>
        <attribute name="maxLogFiles">2</attribute>
        <attribute name="minBuffers">4</attribute>
        <attribute name="threadsWaitingForceThreshold">-1</attribute>
        <reference name="serverInfo">geronimo.system:role=ServerInfo</reference>
    </gbean>
    

This would tell HOWL to use /var/log for its log files.

Derby

Derby's home directory is configured in modules/assembly/src/plan/system-database-plan.xml.

  • <gbean name="geronimo.server:role=DerbySystem" class="org.apache.geronimo.derby.DerbySystemGBean">
        <reference name="serverInfo">geronimo.system:role=ServerInfo</reference>
        <attribute name="derbySystemHome" type="java.lang.String">/var/log/derby</attribute>
    </gbean>