标签:分隔tomcat日志
进入/etc/logrotate.d目录创建tomcat文件,内容如下:
/usr/local/java/tomcat7/logs/catalina.out {
daily
rotate 15
missingok
notifempty
copytruncate
compress
nodelaycompress
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
linux日志分隔
/etc/init.d/rsyslog restart
标签:分隔tomcat日志
原文地址:http://zhangfeikr.blog.51cto.com/1999170/1596194