From d9752f68f5235d71a196ad13181fab827409186b Mon Sep 17 00:00:00 2001 From: Sasha Date: Mon, 29 Jul 2013 12:55:54 +0100 Subject: [PATCH] improve logging system --- log/log4j.properties.dundee | 51 +++++++++++++++++++++++++++++++++++ log/log4j.properties.full | 62 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 log/log4j.properties.dundee create mode 100644 log/log4j.properties.full diff --git a/log/log4j.properties.dundee b/log/log4j.properties.dundee new file mode 100644 index 0000000..afcc70b --- /dev/null +++ b/log/log4j.properties.dundee @@ -0,0 +1,51 @@ + +# change this +logDir =/homes/www-jws2/logs + +log4j.rootLogger=ERROR, stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%m%n + +log4j.logger.compbio=TRACE, ACTIVITY +log4j.appender.ACTIVITY=org.apache.log4j.RollingFileAppender +log4j.appender.ACTIVITY.File=${logDir}/activity.log +log4j.appender.ACTIVITY.MaxFileSize=10MB +log4j.appender.ACTIVITY.MaxBackupIndex=10000 +log4j.appender.ACTIVITY.layout=org.apache.log4j.PatternLayout +log4j.appender.ACTIVITY.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p %3x - %m%n + +log4j.logger.ClustalWS-stats=INFO, STAT +log4j.logger.MuscleWS-stats=INFO, STAT +log4j.logger.TcoffeeWS-stats=INFO, STAT +log4j.logger.MafftWS-stats=INFO, STAT +log4j.logger.ProbconsWS-stats=INFO, STAT +log4j.appender.STAT=org.apache.log4j.RollingFileAppender +log4j.appender.STAT.File=${logDir}/wsaccess.log +log4j.appender.STAT.MaxFileSize=10MB +log4j.appender.STAT.MaxBackupIndex=10000 +log4j.appender.STAT.layout=org.apache.log4j.PatternLayout +log4j.appender.STAT.layout.ConversionPattern=%t %d %m%n + + +# Uncomment for separate local engine execution log +#log4j.logger.compbio.engine.local.LocalExecutorService=INFO, C +#log4j.appender.C=org.apache.log4j.FileAppender +#log4j.appender.C.File=LocalExecutorService.log +#log4j.appender.C.layout=org.apache.log4j.PatternLayout +#log4j.appender.C.layout.ConversionPattern=%m%n + +#Parameter combinator logger (testing only) +#log4j.logger.RunnerLogger=ERROR, RUNNER +#log4j.appender.RUNNER=org.apache.log4j.FileAppender +#log4j.appender.RUNNER.File=RunnerParam.log +#log4j.appender.RUNNER.layout=org.apache.log4j.PatternLayout +#log4j.appender.RUNNER.layout.ConversionPattern=%r [%t] %p %c %x - %m%n + + +#Not used - collection of patterns +# %d{ABSOLUTE} %5p %c{1}:%L - +#log4j.appender.C.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +# %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - +#log4j.appender.ClustalWS-stats.layout.ConversionPattern=%p %d %t %C{4} %m%n diff --git a/log/log4j.properties.full b/log/log4j.properties.full new file mode 100644 index 0000000..9c2d2fe --- /dev/null +++ b/log/log4j.properties.full @@ -0,0 +1,62 @@ + +## CHANGE THIS (The root directory where to store all the log files) +#logDir = . + +## Uncomment to enable JWS2 activity logging to standard out (to the console if available) +## for possible log levels please refer to Log4j documentation http://logging.apache.org/log4j/1.2/manual.html +## Valid log levels are: +## TRACE - log everything from below including very detailed messages (useful for debugging only) +## DEBUG - log everything from below including some minor events (useful for debugging only) +## INFO - log everything from below including some information messages +## WARN - log error and warnings +## ERROR - log errors and fatal events only +## FATAL - log fatal events only + +#log4j.rootLogger=ERROR, stdout +#log4j.appender.stdout=org.apache.log4j.ConsoleAppender +#log4j.appender.stdout.Target=System.out +#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +#log4j.appender.stdout.layout.ConversionPattern=%m%n + +## Uncomment to enable JWS2 activity logging to the file +#log4j.logger.compbio=ERROR, ACTIVITY +#log4j.appender.ACTIVITY=org.apache.log4j.RollingFileAppender +#log4j.appender.ACTIVITY.File=${logDir}/activity.log +#log4j.appender.ACTIVITY.MaxFileSize=10MB +#log4j.appender.ACTIVITY.MaxBackupIndex=10000 +#log4j.appender.ACTIVITY.layout=org.apache.log4j.PatternLayout +#log4j.appender.ACTIVITY.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p %3x - %m%n + +## Uncomment for web access logging. Please do not change the log level! +#log4j.logger.ClustalWS-stats=INFO, STAT +#log4j.logger.MuscleWS-stats=INFO, STAT +#log4j.logger.TcoffeeWS-stats=INFO, STAT +#log4j.logger.MafftWS-stats=INFO, STAT +#log4j.logger.ProbconsWS-stats=INFO, STAT +#log4j.appender.STAT=org.apache.log4j.RollingFileAppender +#log4j.appender.STAT.File=${logDir}/wsaccess.log +#log4j.appender.STAT.MaxFileSize=10MB +#log4j.appender.STAT.MaxBackupIndex=10000 +#log4j.appender.STAT.layout=org.apache.log4j.PatternLayout +#log4j.appender.STAT.layout.ConversionPattern=%t %d %m%n + +## Uncomment for separate local engine execution log (debugging only) +#log4j.logger.compbio.engine.local.LocalExecutorService=INFO, C +#log4j.appender.C=org.apache.log4j.FileAppender +#log4j.appender.C.File=LocalExecutorService.log +#log4j.appender.C.layout=org.apache.log4j.PatternLayout +#log4j.appender.C.layout.ConversionPattern=%m%n + +## Parameter combinator logger (testing only) +#log4j.logger.RunnerLogger=ERROR, RUNNER +#log4j.appender.RUNNER=org.apache.log4j.FileAppender +#log4j.appender.RUNNER.File=RunnerParam.log +#log4j.appender.RUNNER.layout=org.apache.log4j.PatternLayout +#log4j.appender.RUNNER.layout.ConversionPattern=%r [%t] %p %c %x - %m%n + + +## NOT IN USE - collection of patterns choose the one that suits you +# %d{ABSOLUTE} %5p %c{1}:%L - +#log4j.appender.C.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n +# %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - +#log4j.appender.ClustalWS-stats.layout.ConversionPattern=%p %d %t %C{4} %m%n -- 1.7.10.2