tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kwan, Kenneth Y" <Kenneth.Y.K...@pccw.com>
Subject RE: Log rotation HOWTO
Date Fri, 02 Jul 2004 02:15:05 GMT
You may use "cronolog" from http://cronolog.org/. And, modify the
"catalina.sh" as following in the "start" part.

elif [ "$1" = "start" ] ; then

  shift
  if [ "$1" = "-security" ] ; then
    echo "Using Security Manager"
    shift
    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
      -Djava.security.manager \
      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
      -Dcatalina.base="$CATALINA_BASE" \
      -Dcatalina.home="$CATALINA_HOME" \
      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
      org.apache.catalina.startup.Bootstrap "$@"
start|/usr/local/sbin/cronolog /usr/local/tomcat/logs/catalina.out.%Y-%m-%d
>> /dev/null 2>&1 &

      if [ ! -z "$CATALINA_PID" ]; then
        echo $! > $CATALINA_PID
      fi
  else
    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
      -Dcatalina.base="$CATALINA_BASE" \
      -Dcatalina.home="$CATALINA_HOME" \
      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
      org.apache.catalina.startup.Bootstrap "$@"
start|/usr/local/sbin/cronolog /usr/local/tomcat/logs/catalina.out.%Y-%m-%d
>> /dev/null 2>&1 &

      if [ ! -z "$CATALINA_PID" ]; then
        echo $! > $CATALINA_PID
      fi
  fi

Kenneth Kwan
-----Original Message-----
From: Frank Zammetti [mailto:fzammett@hotmail.com]
Sent: Tuesday, June 29, 2004 10:04 PM
To: tomcat-user@jakarta.apache.org
Subject: Log rotation HOWTO


I haven't been able to find a clear answer to this anywhere online, 
hopefully you fine folks can help...

I need a way to rotate my stdout log in Tomcat 5.0.18.  It could be dalily 
or weekly (monthly might be OK too).

Is thre any way to do this?  I assume so, so how?  Thanks in advance all!

_________________________________________________________________
Get fast, reliable Internet access with MSN 9 Dial-up - now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message