I'm using JSVC to start Tomcat 6.0.20 as a daemon on Solaris. Java is
jdk1.6.0_16.
I need to deploy the same war file as 2 different contexts. Each context
has the same logging.properties file in the classes directory. The
conf/logging.properties has not been changed.
Problem: The logging from both contexts IBINET and IBMIN are being
written to both logs. ie IBINET.yyyy-mm-dd.log and IBMIN-yyyy-mm-dd.log.
This did work on my PC where jsvc was not being used. Very difficult to
test with out jsvc on Solaris due to firewall.
Does the logging.properties file below look correct for loggers named
eocene.web.* ?
logging.properties
handlers = 6IBINET.org.apache.juli.FileHandler,
7IBMIN.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
6IBINET.org.apache.juli.FileHandler.level = FINE
6IBINET.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
6IBINET.org.apache.juli.FileHandler.prefix = IBINET.
7IBMIN.org.apache.juli.FileHandler.level = FINE
7IBMIN.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
7IBMIN.org.apache.juli.FileHandler.prefix = IBMIN.
eocene.web.*.[Catalina].[localhost].[/IBINET].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBINET].handlers =
6IBINET.org.apache.juli.FileHandler
eocene.web.*.[Catalina].[localhost].[/IBMIN].level = FINE
eocene.web.*.[Catalina].[localhost].[/IBMIN].handlers =
7IBMIN.org.apache.juli.FileHandler
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
startup script looks like
case "$1" in
start)
#
# Start Tomcat
#
$DAEMON_HOME/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.io.tmpdir=$TMP_DIR \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties
\
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-wait 10 \
-pidfile $PID_FILE \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc.
#-debug \
exit $?
;;
IBINET and IBMIN logs contain the same exact data from both contexts
=>ls -l logs
total 82
-rw-r--r-- 1 eocene01 atthb358 9930 Mar 2 23:26
IBINET.2010-03-02.log
-rw-r--r-- 1 eocene01 atthb358 9930 Mar 2 23:26 IBMIN.2010-03-02.log
-rw-r--r-- 1 root other 1377 Mar 2 23:25
catalina.2010-03-02.log
-rw-r--r-- 1 root other 15722 Mar 2 23:26 catalina.out
-rw-r--r-- 1 root other 0 Mar 2 23:22
host-manager.2010-03-02.log
-rw-r--r-- 1 root other 232 Mar 2 23:22
localhost.2010-03-02.log
-rw-r--r-- 1 root other 1132 Mar 2 23:25
manager.2010-03-02.log