tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r750291 - in /tomcat/trunk/bin: catalina.bat catalina.sh
Date Thu, 05 Mar 2009 02:13:47 GMT
Author: fhanik
Date: Thu Mar  5 02:13:46 2009
New Revision: 750291

URL: http://svn.apache.org/viewvc?rev=750291&view=rev
Log:
Split LOGGING_CONFIG into two options, LOGGING_CONFIG which points to the file, LOGGING_MANAGER
which sets the log manager
This makes it much easier to handle directories with spaces


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=750291&r1=750290&r2=750291&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Thu Mar  5 02:13:46 2009
@@ -64,10 +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   LOGGING_CONFIG  (Optional) Override Tomcat's 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                   set LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
+rem
+rem   LOGGING_MANAGER (Optional) Override Tomcat's logging manager 
+rem                   Example (all one line)
+rem                   set LOGGING_CONFIG="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 rem
 rem
 rem
@@ -121,13 +124,18 @@
 set CATALINA_TMPDIR=%CATALINA_BASE%\temp
 :gotTmpdir
 
-if not "%LOGGING_CONFIG%" == "" goto noJuli
+if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
 set LOGGING_CONFIG=-Dnop
-if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuli
-set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-:noJuli
+if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
+set LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
+:noJuliConfig
 set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
 
+if not "%LOGGING_MANAGER%" == "" goto noJuliManager
+set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
+:noJuliManager
+set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
+
 rem ----- Execute The Requested Command ---------------------------------------
 
 echo Using CATALINA_BASE:   %CATALINA_BASE%

Modified: tomcat/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=750291&r1=750290&r2=750291&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Thu Mar  5 02:13:46 2009
@@ -67,10 +67,13 @@
 #   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
+#   LOGGING_CONFIG  (Optional) Override Tomcat's 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"
+#                   LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
+#
+#   LOGGING_MANAGER (Optional) Override Tomcat's logging manager 
+#                   Example (all one line)
+#                   LOGGING_CONFIG="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 #
 # $Id$
 # -----------------------------------------------------------------------------
@@ -184,16 +187,22 @@
   JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
 fi
 
-# Set juli LogManager if it is present and an override has not been issued
+# Set juli LogManager config file 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
+
+if [ -z "$LOGGING_MANAGER" ]; then
+  JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+else 
+  JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
+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


Mime
View raw message