This page provides simple instructions for enabling OGSA-DAI logging. OGSA-DAI logging is based upon Apache Log4J. For full details of Apache Log4J configuration please refer to the Log4J documentation.
The levels we use are those used by Apache Log4J. These levels, and the information within OGSA-DAI which is logged at those levels, are as follows:
As logging carries an overhead we recommend that the minimum level you use in a production system is INFO and that you only enable the DEBUG when you have encountered serious problems (typically the OGSA-DAI team will recommend this when assisting in resolving any support queries for example).
The steps below explain how to configure Log4J to log all messages to a rolling file. This is a file with a limited size and when the limit is reached the file will be renamed by appending a count to the filename, then a new file will be created.
# Categories log4j.rootLogger=YOUR-LEVEL, ROLLINGFILE log4j.category.org.apache=ERROR, ROLLINGFILE log4j.category.org.globus=ERROR, ROLLINGFILE # ROLLINGFILE appender log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender log4j.appender.ROLLINGFILE.Threshold=YOUR-LEVEL log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.ROLLINGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n log4j.appender.ROLLINGFILE.File=LOGFILEwhere
The steps below explain how to configure Log4J to log all messages to the a log file - if using Tomcat - or the console - if using the Globus Toolkit Web services container.
TOMCAT/webapps/wsrf/WEB-INF/classes/log4j.properties
GLOBUS_LOCATION/container-log4j.properties
log4j.category.org.globus=INFOAdd the following line:
log4j.category.uk.org.ogsadai=YOUR-LEVEL
where YOUR-LEVEL is your chosen logging level (one of DEBUG INFO, WARN ERROR, OR FATAL)
TOMCAT/webapps/wsrf/WEB-INF/lib
GLOBUS_LOCATION/lib
To log messages to a file instead of the console for the Globus Web services container, it is necessary to add a file appender or rolling file appender to the Log4J configuration file. This approach is shown in the OGSA-DAI WSI example above and is explained in more detail in the Log4J manual. Note that for the Globus container, console log messages are displayed within the console in which the container was started.
Up: OGSA-DAI User Guide | ||
© International Business Machines Corporation, 2002-2006 | © The University of Edinburgh, 2002-2006 |