[cddlm] how we create our logs
Steve Loughran
steve_loughran at hpl.hp.com
Wed Jun 21 09:41:26 CDT 2006
This is the log4j.properties file used to create the logs you see on our
interop site
# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE
log4j.rootCategory=INFO, CONSOLE,WWW
#wire debugging of HTTP client
#log4j.logger.httpclient.wire=DEBUG
log4j.logger.org.smartfrog=INFO
log4j.logger.org.smartfrog.sfcore.languages.cdl=DEBUG
log4j.logger.org.smartfrog.services.cddlm=DEBUG
log4j.logger.org.smartfrog.services.xml=DEBUG
log4j.logger.org.smartfrog.services.deployapi=DEBUG
log4j.logger.org.smartfrog.sfcore.languages.cdl.CdlCatalog=INFO
log4j.logger.org.smartfrog.services.deployapi.binding.NuxStaxBuilder=INFO
log4j.logger.org.smartfrog.projects.alpine=DEBUG
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
log4j.appender.CONSOLE.layout.ConversionPattern=%-4r %-5p %c %x - %m%n
log4j.appender.WWW=org.apache.log4j.DailyRollingFileAppender
log4j.appender.WWW.DatePattern='.'yyyy-MM-dd-HH'.html'
log4j.appender.WWW.File=/home/slo/public_html/logs/server-log.html
log4j.appender.WWW.layout=org.apache.log4j.HTMLLayout
log4j.appender.WWW.layout.LocationInfo=true
#the following options are for the RollingFileAppender, not the daily one
#log4j.appender.WWW.MaxFileSize=1000KB
#log4j.appender.WWW.MaxBackupIndex=48
The secret is the DailyRollingfileAppender with its HTMLLayout; this
creates HTML pages and moves them every day
-you need to create the destination directory as log4j fails if it is
not already there.
-to serve up the logs you need to publish them to a visible directory.
We do this by deploying another jetty web app to serve the log direcotry
-printing out the received messages is something that different stacks
do differently. For Alpine I just wrote a LogMessageHandler that does
nothing but log the current message.
enjoy,
-steve
More information about the cddlm-wg
mailing list