在/etc/logrotate.d/下创建ice_grid_out_log,如果想马上切割,可以输入以下指令logrotate -vf /etc/logrotate.d/ice_grid_out_log,切出来的文件是/opt/ice_project/data/node/ServerPersonVerify-2.err-20190918。
ice_grid_out_log内容:
/opt/ice_project/data/node/*.out {
su ice ice #logrotate 3.8版本需要添加,3.7版本需要去掉
daily
rotate 7
dateext
create
missingok
notifempty
copytruncate
nocompress
noolddir
}