安装步骤: wget http://pkgs.fedoraproject.org/repo/pkgs/cronolog/cronolog-1.6.2.tar.gz/a44564fd5a5b061a5691b9a837d04979/cronolog-1.6.2.tar.gz tar zxvf cronolog-1.6.2.tar.gz cd cronolog-1.6.2 ./configure make make install which cronolog
最后,一般情况下显示为:/usr/local/sbin/cronolog 就安装成功了。
然后: 修改tomcat/bin目录下的catalina.sh文件中的
org.apache.catalina.startup.Bootstrap “$@” start \ >> “$CATALINA_BASE”/logs/catalina.out 2>&1 &
也可能是:
org.apache.catalina.startup.Bootstrap "$@" start \ >> "$CATALINA_OUT" 2>&1 "&"
为:
org.apache.catalina.startup.Bootstrap "$@" start 2>&1 \ | /usr/local/sbin/cronolog "$CATALINA_BASE"/logs/catalina.%Y-%m-%d.out >> /dev/null &
另外,这行可以注释掉: touch “$CATALINA_BASE”/logs/catalina.out 也可能是: touch "$CATALINA_OUT"
然后重启tomcat,看logs文件中是否有catalina.2009-07-01.out样式的日志
|