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 ---------------------------------------------------------------------------
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 ---------------------------------------
# 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$
# -----------------------------------------------------------------------------
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