1. 程式人生 > >Tomcat的catalina.out日誌切分

Tomcat的catalina.out日誌切分

修改bin目錄下catalina.sh的221行
if [ -z "$CATALINA_OUT" ] ; then
  CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
fi
修改為:
if [ -z "$CATALINA_OUT" ] ; then
  CATALINA_OUT="$CATALINA_BASE"/logs/catalina/"$(date +%Y-%m-%d)".out
fi