先安装cronolog
再修改catalina.sh
#touch "CATALINA_OUT"
if [ "
1" = "-security" ] ; then
if [ have_tty -eq 1 ]; then
echo "Using Security Manager"
fi
shift
eval "\"
_RUNJAVA\"" "\"LOGGING_CONFIG\""LOGGING_MANAGER JAVA_OPTSCATALINA_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 2>&1 \
|/usr/sbin/cronolog "
CATALINA_BASE"/logs/catalina.out.%Y-%m-%d.out>> /dev/null &

else
eval "\"_RUNJAVA\"" "\"LOGGING_CONFIG\"" LOGGING_MANAGERJAVA_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 2>&1 \
|/usr/sbin/cronolog "
CATALINA_BASE"/logs/catalina.out.%Y-%m-%d.out>> /dev/null &

1 对 “catalina.out分割”的想法;

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code