Minimal log4j->log4j2 config properties - some of these are not used in JABAWS 2
authorJim Procter <j.procter@dundee.ac.uk>
Fri, 17 Dec 2021 17:25:06 +0000 (17:25 +0000)
committerJim Procter <j.procter@dundee.ac.uk>
Mon, 20 Dec 2021 17:06:45 +0000 (17:06 +0000)
build.xml
log/log4j.properties.dundee [deleted file]
log/log4j2.dundee.properties [new file with mode: 0644]
log/log4j2.properties [moved from log/log4j.properties with 82% similarity]

index 256cb45..00dfb50 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -84,7 +84,7 @@
                <delete file="${basedir}/activity.log" />
                <delete file="${basedir}/derby.log" />
                <mkdir dir="${classes}" />
-               <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
+               <copy file="${basedir}/log/log4j2.properties" tofile="${classes}/log4j2.properties" />
        </target>
 
        <!-- Clean up temp directories and dist directory (all jar, zip, and war files deleted) -->
        -->
        <target name="compile_with_debug" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug enabled.">
                <!-- copy files to class path-->
-               <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
+               <copy file="${basedir}/log/log4j2.properties" tofile="${classes}/log4j2.properties" />
                <!-- Complile the datamodel first -->
                <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="${JAVA_TARGET}" debug="on" encoding="UTF-8" verbose="false" nowarn="true" >
                        <compilerarg value="-Xlint:unchecked"/>
        -->
        <target name="compile" depends="clean" description="Perform a multiple step compilation to ensure layered structure is preserved. Debug disabled, optimisation enabled. Tests are not compiled.">
                <!-- copy files to class path-->
-               <copy file="${basedir}/log/log4j.properties" tofile="${classes}/log4j.properties" />
+               <copy file="${basedir}/log/log4j2.properties" tofile="${classes}/log4j2.properties" />
                <!-- Complile the datamodel first -->
                <javac srcdir="${basedir}/datamodel" destdir="${classes}" target="${JAVA_TARGET}" debug="off" optimize="on" encoding="UTF-8" verbose="false" nowarn="true">
                        <compilerarg value="-Xlint:-unchecked" />
                        <zipfileset dir="${basedir}/docs" excludes="_build/**"/>
                        <zipfileset dir="." includes="${full-jabaws-client}" fullpath="WEB-INF/lib/jabaws-client.jar"/>
                        <!-- Put a copy of log4j configuration file where it can be used  -->
-                       <zipfileset dir="log" includes="log4j.properties" prefix="WEB-INF/classes"/>
+                       <zipfileset dir="log" includes="log4j2.properties" prefix="WEB-INF/classes"/>
                </zip>
        </target>
 
diff --git a/log/log4j.properties.dundee b/log/log4j.properties.dundee
deleted file mode 100644 (file)
index afcc70b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-\r
-# change this \r
-logDir =/homes/www-jws2/logs\r
-\r
-log4j.rootLogger=ERROR, stdout\r
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender\r
-log4j.appender.stdout.Target=System.out\r
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.stdout.layout.ConversionPattern=%m%n\r
-\r
-log4j.logger.compbio=TRACE, ACTIVITY\r
-log4j.appender.ACTIVITY=org.apache.log4j.RollingFileAppender\r
-log4j.appender.ACTIVITY.File=${logDir}/activity.log\r
-log4j.appender.ACTIVITY.MaxFileSize=10MB\r
-log4j.appender.ACTIVITY.MaxBackupIndex=10000\r
-log4j.appender.ACTIVITY.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.ACTIVITY.layout.ConversionPattern=%d{MM-dd@HH:mm:ss} %-5p %3x - %m%n\r
-\r
-log4j.logger.ClustalWS-stats=INFO, STAT\r
-log4j.logger.MuscleWS-stats=INFO, STAT\r
-log4j.logger.TcoffeeWS-stats=INFO, STAT\r
-log4j.logger.MafftWS-stats=INFO, STAT\r
-log4j.logger.ProbconsWS-stats=INFO, STAT\r
-log4j.appender.STAT=org.apache.log4j.RollingFileAppender\r
-log4j.appender.STAT.File=${logDir}/wsaccess.log\r
-log4j.appender.STAT.MaxFileSize=10MB\r
-log4j.appender.STAT.MaxBackupIndex=10000\r
-log4j.appender.STAT.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.STAT.layout.ConversionPattern=%t %d %m%n\r
-\r
-\r
-# Uncomment for separate local engine execution log\r
-#log4j.logger.compbio.engine.local.LocalExecutorService=INFO, C\r
-#log4j.appender.C=org.apache.log4j.FileAppender\r
-#log4j.appender.C.File=LocalExecutorService.log\r
-#log4j.appender.C.layout=org.apache.log4j.PatternLayout\r
-#log4j.appender.C.layout.ConversionPattern=%m%n\r
-\r
-#Parameter combinator logger (testing only)\r
-#log4j.logger.RunnerLogger=ERROR, RUNNER\r
-#log4j.appender.RUNNER=org.apache.log4j.FileAppender\r
-#log4j.appender.RUNNER.File=RunnerParam.log \r
-#log4j.appender.RUNNER.layout=org.apache.log4j.PatternLayout\r
-#log4j.appender.RUNNER.layout.ConversionPattern=%r [%t] %p %c %x - %m%n\r
-\r
-\r
-#Not used - collection of patterns\r
-# %d{ABSOLUTE} %5p %c{1}:%L -\r
-#log4j.appender.C.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n\r
-# %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
-#log4j.appender.ClustalWS-stats.layout.ConversionPattern=%p %d %t %C{4} %m%n\r
diff --git a/log/log4j2.dundee.properties b/log/log4j2.dundee.properties
new file mode 100644 (file)
index 0000000..f7caed0
--- /dev/null
@@ -0,0 +1,98 @@
+status = error\r
+dest = err\r
+name = PropertiesConfig\r
+\r
+#dest = err\r
+#name = dundee\r
+\r
+# change this \r
+property.logDir = www-jws2-logs\r
+\r
+\r
+appender.stdout.type = Console\r
+appender.stdout.name = stdout\r
+appender.stdout.layout.type = PatternLayout\r
+appender.stdout.layout.pattern = %m%n\r
+appender.stdout.filter.threshold.type = ThresholdFilter\r
+appender.stdout.filter.threshold.level = ERROR\r
+\r
+rootLogger.level = ERROR\r
+rootLogger.appenderRef.stdout.ref = stdout\r
+\r
+appender.ACTIVITY.type = RollingFile\r
+appender.ACTIVITY.name = ACTIVITY\r
+appender.ACTIVITY.fileName = ${logDir}/activity.log\r
+appender.ACTIVITY.filePattern = ${logDir}/activity-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz\r
+appender.ACTIVITY.policies.type = Policies\r
+appender.ACTIVITY.policies.size.type = SizeBasedTriggeringPolicy\r
+appender.ACTIVITY.policies.size.size = 10MB\r
+appender.ACTIVITY.strategy.type = DefaultRolloverStrategy\r
+appender.ACTIVITY.strategy.max = 10000\r
+appender.ACTIVITY.layout.type = PatternLayout\r
+appender.ACTIVITY.layout.pattern = %d{MM-dd@HH:mm:ss} %-5p %3x - %m%n\r
+\r
+\r
+logger.compbio.level = INFO\r
+logger.compbio.name = compbio\r
+logger.compbio.appenderRef.ACTIVITY.ref = ACTIVITY\r
+\r
+\r
+appender.STAT.type = RollingFile\r
+appender.STAT.name = STAT\r
+appender.STAT.fileName = ${logDir}/wsaccess.log\r
+appender.STAT.filePattern = ${logDir}/wsaccess-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz \r
+appender.STAT.policies.type = Policies\r
+appender.STAT.policies.size.type = SizeBasedTriggeringPolicy\r
+appender.STAT.policies.size.size = 10MB\r
+appender.STAT.strategy.type = DefaultRolloverStrategy\r
+appender.STAT.strategy.max = 10000\r
+appender.STAT.layout.type = PatternLayout\r
+appender.STAT.layout.pattern = %d{MM-dd@HH:mm:ss} %-5p %3x - %m%n\r
+\r
+logger.ClustalWS-stats.name = ClustalWS-stats\r
+logger.ClustalWS-stats.appenderRef.STAT.ref = STAT\r
+logger.ClustalWS-stats.level = INFO\r
+\r
+logger.MuscleWS-stats.name = MuscleWS-stats\r
+logger.MuscleWS-stats.appenderRef.STAT.ref = STAT\r
+logger.MuscleWS-stats.level = INFO\r
+\r
+logger.TcoffeeWS-stats.name = TcoffeeWS-stats\r
+logger.TcoffeeWS-stats.appenderRef.STAT.ref = STAT\r
+logger.TcoffeeWS-stats.level = INFO\r
+\r
+\r
+logger.MafftWS-stats.name = MafftWS-stats\r
+logger.MafftWS-stats.appenderRef.STAT.ref = STAT\r
+logger.MafftWS-stats.level = INFO\r
+\r
+logger.ProbconsWSstats.name = ProbconsWSstats\r
+logger.ProbconsWSstats.appenderRef.STAT.ref = STAT\r
+logger.ProbconsWSstats.level = INFO\r
+\r
+\r
+\r
+\r
+# Uncomment for separate local engine execution log\r
+# TODO - STILL LOG4J 1.2.x\r
+#log4j.logger.compbio.engine.local.LocalExecutorService = INFO, C\r
+#log4j.appender.C = org.apache.log4j.FileAppender\r
+#log4j.appender.C.File = LocalExecutorService.log\r
+#log4j.appender.C.layout = org.apache.log4j.PatternLayout\r
+#log4j.appender.C.layout.ConversionPattern = %m%n\r
+\r
+#Parameter combinator logger (testing only)\r
+# TODO - STILL LOG4J 1.2.x\r
+#log4j.logger.RunnerLogger = ERROR, RUNNER\r
+#log4j.appender.RUNNER = org.apache.log4j.FileAppender\r
+#log4j.appender.RUNNER.File = RunnerParam.log \r
+#log4j.appender.RUNNER.layout = org.apache.log4j.PatternLayout\r
+#log4j.appender.RUNNER.layout.ConversionPattern = %r [%t] %p %c %x - %m%n\r
+\r
+\r
+#Not used - collection of patterns\r
+# TODO - STILL LOG4J 1.2.x\r
+# %d{ABSOLUTE} %5p %c{1}:%L -\r
+#log4j.appender.C.layout.ConversionPattern = %-4r [%t] %-5p %c %x - %m%n\r
+# %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+#log4j.appender.ClustalWS-stats.layout.ConversionPattern = %p %d %t %C{4} %m%n\r
similarity index 82%
rename from log/log4j.properties
rename to log/log4j2.properties
index cd2a406..ff3dc5d 100644 (file)
@@ -50,18 +50,27 @@ org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
 #log4j.appender.stdout.layout.ConversionPattern=%m%n\r
 #log4j.rootLogger=info, stdout\r
 \r
-log4j.rootLogger=ERROR, R\r
-log4j.appender.R=org.apache.log4j.FileAppender\r
-log4j.appender.R.File=${catalina.base}/logs/JABAWSErrorFile.log\r
-log4j.appender.R.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.R.layout.ConversionPattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+\r
+appender.R.name = R\r
+appender.R.type = File\r
+appender.R.fileName = ${catalina.base}/logs/JABAWSErrorFile.log\r
+appender.R.layout.type = PatternLayout\r
+appender.R.layout.pattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+\r
+appender.B.name = B\r
+appender.B.type = File\r
+appender.B.fileName=${catalina.base}/logs/engine.log\r
+appender.B.layout.type = PatternLayout\r
+appender.B.layout.pattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+\r
+rootLogger.Level = ERROR\r
+rootLogger.appenderRef = R\r
 \r
 # %d{ABSOLUTE} %5p %c{1}:%L -\r
-log4j.logger.compbio=WARN, B\r
-log4j.appender.B=org.apache.log4j.FileAppender\r
-log4j.appender.B.File=${catalina.base}/logs/engine.log\r
-log4j.appender.B.layout=org.apache.log4j.PatternLayout\r
-log4j.appender.B.layout.ConversionPattern=%m%n %d{MM-dd@HH:mm:ss} %-5p (%13F:%L) %3x - \r
+logger.compbio.level = TRACE\r
+logger.compbio.appenderRef = B\r
+logger.compbio.name = compbio\r
+\r
 \r
 # %d{ABSOLUTE} %5p %c{1}:%L -\r
 #log4j.logger.compbio.engine.local.LocalExecutorService=INFO, C\r