You can try disabling debugging in your server.xml
for example:
Server port=8005 shutdown=SHUTDOWN debug=1
to
Server port=8005 shutdown=SHUTDOWN debug=0
there are several others. The other thing to check is to check the log
level for the log. You'll have to check the tomcat manual for that... it
escapes me at the moment. But for example you can change the log level
for mod_jk if you're using it
in apache:
JkLogLevel debug to
JkLogLevel emerg
The best thing though is to rotate the logs, assuming you have a tomcat
startup/shutdown script. This is from memory so it might not be
syntactically correct but you get the idea
#!/bin/sh
# tomcat startup/shutdown script
# jm-tomcat.sh
TOMCAT_HOME=/usr/local/tomcat
JAVA_HOME=/usr/java
CATALINA_HOME=${TOMCAT_HOME}
SCRIPT_NAME=`basename $0`
Usage()
{
echo ${SCRIPT_NAME} start|stop|restart
exit 1
}
if [ $# != 1 ];
then
Usage
fi
case $1 in
start)
if [ -f ${CATALINA_HOME}/bin/startup.sh ];
then
${CATALINA_HOME}/bin/startup.sh
if [ $? != 0 ];
then
echo Tomcat failed to start!
exit 1
else
echo Tomcat started successfully!
exit 0
fi
echo $$ /tmp/tomcat.pid # this may or may not work
fi
;;
stop)
if [ -f ${CATALINA_HOME}/bin/shutdown.sh ];
then
${CATALINA_HOME}/bin/shutdown.sh
if [ $? != 0 ];
then
echo Tomcat failed to stop! Is Tomcat running? /bin/ps -ef |
grep java
exit 1
else
echo Tomcat terminated successfully!
exit 0
fi
;;
restart)
echo Restarting tomcat
$0 stop
sleep 5
$0 start
;;
esac
#!/bin/sh
# rotate logs
# jm-rotate.sh
SRCPATH=/usr/local/tomcat/logs
DSTPATH=/archive # place to store them
SCRIPT_NAME=`basename $0`
LOG_TO_ROTATE=mod_jk.log # name of log to rotate
make_backup()
{
# Save the number of days here
# I'm pretty proud of myself for figuring out this one ^_^
# this part of the code should work since I'm using this somewhere
# else
FILE=$1
# save 5 days with 4 being the oldest and 0 the newest
for i in 4 3 2 1 0
do
# uncomment this for debugging
#echo ${FILE}.${i}
if [ -r ${FILE}.${i} ];
then
k=`expr $i + 1`
echo /bin/mv -f ${FILE}.${i} to ${FILE}.${k}
/bin/mv -f ${FILE}.${i} ${FILE}.${k}
fi
done
return
}
# Stop tomcat
/tmp/jm-tomcat.sh stop
if [ $? = 0 ];
then
# rotate logs in archive directory
make_backup ${DSTDIR}/${LOG_TO_ROTATE}
# get the most current one for today
if [ -r ${SRCDIR}/${LOG_TO_ROTATE} ];
then
/bin/mv ${SRCDIR}/${LOG_TO_ROTATE} ${DSTDIR}/${LOG_TO_ROTATE}.0
fi
echo Backup is complete! Thanks for using JM Script. Have a nice day!
# backup is done--restart tomcat
/tmp/jm-tomcat.sh start
fi
Hope that helps..
Jan-Michael Ong
- Original Message -
From: yves lambert [EMAIL PROTECTED]
Date: Saturday, November 9, 2002 7:38 am
Subject: Re: how to STOP TOMCAT LOGGING
randie ursal wrote:
hi list,
how can i disable logging on TOMCAT?
i have a tomcat on a Solaris 8.0 machine, and when i look at the
logs folder the log files from previous months was not erased. so,
if this is going on for so long there's a tendency that my disk
space will be full.
BTW, im using jakarta-tomcat-4.0.
thanks.
--
To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org
i suggest you the followings:
- buy a 80 GB hard disk
- delete files each time you backup your HD
- Unsubscribe to all EZLN or else your disk will be filled faster
--
\/
/\
--
To unsubscribe, e-mail: mailto:tomcat-user-
[EMAIL PROTECTED]For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org
--
To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org