logrotate cron job not rotating certain logs

后端 未结 6 977
生来不讨喜
生来不讨喜 2021-02-05 14:01

I added two scripts in \"logrotate.d\" directory for my application logs to be rotated. This is the config for one of them:

 {
  compress
           


        
6条回答
  •  情书的邮戳
    2021-02-05 14:37

    Just to generalize the above and make sure same SELinux context is properly set for all future files:

    semanage fcontext -a -t var_log_t "(/.*)?"
    restorecon -v 
    

提交回复
热议问题