From 8645c518f8ed84cc294ba35a454c050c16c12803 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Thu, 17 Sep 2009 17:07:03 +0000 Subject: [PATCH] Merging logging config changes from trunk git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-5.3@816280 13f79535-47bb-0310-9956-ffa450edef68 --- assembly/src/release/bin/activemq | 2 +- assembly/src/release/bin/activemq.bat | 2 +- .../src/release/bin/linux-x86-32/wrapper.conf | 2 +- .../src/release/bin/linux-x86-64/wrapper.conf | 2 +- assembly/src/release/bin/macosx/wrapper.conf | 2 +- assembly/src/release/bin/win32/wrapper.conf | 2 +- assembly/src/release/conf/log4j.properties | 37 +++++++++---------- assembly/src/release/conf/logging.properties | 25 +++++++++++++ 8 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 assembly/src/release/conf/logging.properties diff --git a/assembly/src/release/bin/activemq b/assembly/src/release/bin/activemq index 4cecacbe5c..6909276705 100755 --- a/assembly/src/release/bin/activemq +++ b/assembly/src/release/bin/activemq @@ -127,7 +127,7 @@ if $cygwin; then fi if [ -z "$ACTIVEMQ_OPTS" ] ; then - ACTIVEMQ_OPTS="-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true" + ACTIVEMQ_OPTS="-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=${ACTIVEMQ_BASE}/logging.properties" fi if [ -z "$SUNJMX" ] ; then diff --git a/assembly/src/release/bin/activemq.bat b/assembly/src/release/bin/activemq.bat index 73c51090c3..4a3dbc2aae 100755 --- a/assembly/src/release/bin/activemq.bat +++ b/assembly/src/release/bin/activemq.bat @@ -71,7 +71,7 @@ echo. if "%ACTIVEMQ_BASE%" == "" set ACTIVEMQ_BASE=%ACTIVEMQ_HOME% -if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true +if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=${ACTIVEMQ_BASE}\logging.properties if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote REM set SUNJMX=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false diff --git a/assembly/src/release/bin/linux-x86-32/wrapper.conf b/assembly/src/release/bin/linux-x86-32/wrapper.conf index 6fb9cdc85c..e78e4c93d9 100644 --- a/assembly/src/release/bin/linux-x86-32/wrapper.conf +++ b/assembly/src/release/bin/linux-x86-32/wrapper.conf @@ -51,7 +51,7 @@ wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.k wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts wrapper.java.additional.7=-Dcom.sun.management.jmxremote wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true -wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true +wrapper.java.additional.9=-Djava.util.logging.config.file=%ACTIVEMQ_BASE%/logging.properties # Uncomment to enable jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 diff --git a/assembly/src/release/bin/linux-x86-64/wrapper.conf b/assembly/src/release/bin/linux-x86-64/wrapper.conf index 6fb9cdc85c..e78e4c93d9 100644 --- a/assembly/src/release/bin/linux-x86-64/wrapper.conf +++ b/assembly/src/release/bin/linux-x86-64/wrapper.conf @@ -51,7 +51,7 @@ wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.k wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts wrapper.java.additional.7=-Dcom.sun.management.jmxremote wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true -wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true +wrapper.java.additional.9=-Djava.util.logging.config.file=%ACTIVEMQ_BASE%/logging.properties # Uncomment to enable jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 diff --git a/assembly/src/release/bin/macosx/wrapper.conf b/assembly/src/release/bin/macosx/wrapper.conf index 0ca23182e6..222d9c645c 100644 --- a/assembly/src/release/bin/macosx/wrapper.conf +++ b/assembly/src/release/bin/macosx/wrapper.conf @@ -51,7 +51,7 @@ wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.k wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts wrapper.java.additional.7=-Dcom.sun.management.jmxremote wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true -wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true +wrapper.java.additional.9=-Djava.util.logging.config.file=%ACTIVEMQ_BASE%/logging.properties # Uncomment to enable jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 diff --git a/assembly/src/release/bin/win32/wrapper.conf b/assembly/src/release/bin/win32/wrapper.conf index 447f342333..cf774ba5a7 100644 --- a/assembly/src/release/bin/win32/wrapper.conf +++ b/assembly/src/release/bin/win32/wrapper.conf @@ -51,7 +51,7 @@ wrapper.java.additional.5=-Djavax.net.ssl.keyStore="%ACTIVEMQ_BASE%/conf/broker. wrapper.java.additional.6=-Djavax.net.ssl.trustStore="%ACTIVEMQ_BASE%/conf/broker.ts" wrapper.java.additional.7=-Dcom.sun.management.jmxremote wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=true -wrapper.java.additional.9=-Dderby.storage.fileSyncTransactionLog=true +wrapper.java.additional.9=-Djava.util.logging.config.file=%ACTIVEMQ_BASE%/logging.properties # Uncomment to enable remote jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 diff --git a/assembly/src/release/conf/log4j.properties b/assembly/src/release/conf/log4j.properties index e5b3f8ebfb..8cb9c4c981 100755 --- a/assembly/src/release/conf/log4j.properties +++ b/assembly/src/release/conf/log4j.properties @@ -16,36 +16,35 @@ ## --------------------------------------------------------------------------- # -# +# This file controls most of the logging in ActiveMQ which is mainly based around +# the commons logging API. # -log4j.rootLogger=INFO, stdout, out +log4j.rootLogger=INFO, console, logfile log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.springframework=WARN -log4j.logger.org.apache.xbean.spring=WARN +log4j.logger.org.apache.xbean=WARN +log4j.logger.org.apache.camel=ERROR # When debugging or reporting problems to the ActiveMQ team, # comment out the above lines and uncomment the next. -#log4j.rootLogger=DEBUG, out, stdout +#log4j.rootLogger=DEBUG, logfile, console # Or for more fine grained debug logging uncomment one of these #log4j.logger.org.apache.activemq=DEBUG #log4j.logger.org.apache.camel=DEBUG - - -#The logging properties used during tests.. -# CONSOLE appender not used by default -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%-5p %-30.30c{1} - %m%n -#log4j.appender.stdout.threshold=INFO +# Console appender +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%5p | %m%n +log4j.appender.console.threshold=INFO # File appender -log4j.appender.out=org.apache.log4j.RollingFileAppender -log4j.appender.out.file=${activemq.base}/data/activemq.log -log4j.appender.out.maxFileSize=1024KB -log4j.appender.out.maxBackupIndex=5 -log4j.appender.out.append=true -log4j.appender.out.layout=org.apache.log4j.PatternLayout -log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n +log4j.appender.logfile=org.apache.log4j.RollingFileAppender +log4j.appender.logfile.file=${activemq.base}/data/activemq.log +log4j.appender.logfile.maxFileSize=1024KB +log4j.appender.logfile.maxBackupIndex=5 +log4j.appender.logfile.append=true +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n diff --git a/assembly/src/release/conf/logging.properties b/assembly/src/release/conf/logging.properties new file mode 100644 index 0000000000..7551b7d24e --- /dev/null +++ b/assembly/src/release/conf/logging.properties @@ -0,0 +1,25 @@ +## --------------------------------------------------------------------------- +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## --------------------------------------------------------------------------- + +# +# This file controls logging which is done over the java.logging API +# + +#handlers = java.util.logging.ConsoleHandler +#java.util.logging.ConsoleHandler.level=INFO +#java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter +#.level=INFO# \ No newline at end of file