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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to