Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 9010 invoked from network); 5 Mar 2009 00:35:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2009 00:35:56 -0000 Received: (qmail 34797 invoked by uid 500); 5 Mar 2009 00:35:53 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 34756 invoked by uid 500); 5 Mar 2009 00:35:53 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 34745 invoked by uid 99); 5 Mar 2009 00:35:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 16:35:53 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 00:35:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6ADAD238889E; Thu, 5 Mar 2009 00:35:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r750258 - in /tomcat/trunk/bin: catalina.bat catalina.sh Date: Thu, 05 Mar 2009 00:35:24 -0000 To: dev@tomcat.apache.org From: fhanik@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090305003524.6ADAD238889E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fhanik Date: Thu Mar 5 00:35:23 2009 New Revision: 750258 URL: http://svn.apache.org/viewvc?rev=750258&view=rev Log: Make LOGGING_CONFIG a variable that you can set, just like all the other script variables Modified: tomcat/trunk/bin/catalina.bat tomcat/trunk/bin/catalina.sh Modified: tomcat/trunk/bin/catalina.bat URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=750258&r1=750257&r2=750258&view=diff ============================================================================== --- tomcat/trunk/bin/catalina.bat (original) +++ tomcat/trunk/bin/catalina.bat Thu Mar 5 00:35:23 2009 @@ -64,6 +64,13 @@ rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%, rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND% rem +rem LOGGING_CONFIG (Optional) Override Tomcat's logging manager and logging config file +rem Example (all one line) +rem set LOGGING_CONFIG=-Djava.util.logging.manager=com.foo.MyLogManager +rem -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties +rem +rem +rem rem $Id$ rem --------------------------------------------------------------------------- @@ -114,9 +121,12 @@ set CATALINA_TMPDIR=%CATALINA_BASE%\temp :gotTmpdir +if not "%LOGGING_CONFIG%" == "" goto noJuli +set LOGGING_CONFIG=-Dnop if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuli -set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" +set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager :noJuli +set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% rem ----- Execute The Requested Command --------------------------------------- Modified: tomcat/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=750258&r1=750257&r2=750258&view=diff ============================================================================== --- tomcat/trunk/bin/catalina.sh (original) +++ tomcat/trunk/bin/catalina.sh Thu Mar 5 00:35:23 2009 @@ -67,6 +67,11 @@ # CATALINA_PID (Optional) Path of the file which should contains the pid # of catalina startup java process, when start (fork) is used # +# LOGGING_CONFIG (Optional) Override Tomcat's logging manager and logging config file +# Example (all one line) +# LOGGING_CONFIG="-Djava.util.logging.manager=com.foo.MyLogManager \ +# -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" +# # $Id$ # ----------------------------------------------------------------------------- @@ -179,15 +184,16 @@ JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` fi -# Set juli LogManager if it is present -if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then - JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" - LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" -else - # Bugzilla 45585 - LOGGING_CONFIG="-Dnop" +# Set juli LogManager if it is present and an override has not been issued +if [ -z "$LOGGING_CONFIG" ]; then + if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then + JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" + LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" + else + # Bugzilla 45585 + LOGGING_CONFIG="-Dnop" + fi fi - # ----- Execute The Requested Command ----------------------------------------- # Bugzilla 37848: only output this if we have a TTY --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org