Logrotateは自動的に回転しませんが、logrotate -dとlogrotate -fと一緒に使用できます。

Logrotateは自動的に回転しませんが、logrotate -dとlogrotate -fと一緒に使用できます。

Logrotate は自動的に回転しませんが、エラーを表示せずに logrotate -d および logrotate -f で使用できます。しかし、毎日自動的に実行されるわけではありません。以下は logrotate -d 出力です。

logrotate -d  /etc/logrotate.d/lumen 
reading config file /etc/logrotate.d/lumen
Allocating hash table for state file, size 15360 B

Handling 1 logs

rotating pattern: /var/www/*/storage/logs/*.log  after 1 days (365 rotations)
empty log files are rotated, old logs are removed
switching euid to 48 and egid to 48
considering log /var/www/testdir/storage/logs/laravel.log
  log needs rotating
rotating log /var/www/testdir/storage/logs/laravel.log, log->rotateCount is 365
Converted ' -%Y%m%d' -> '-%Y%m%d'
dateext suffix '-20190425'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
compressing log with: /bin/gzip
fscreate context set to unconfined_u:object_r:httpd_user_rw_content_t:s0
renaming /var/www/testdir/storage/logs/laravel.log to /var/www/testdir/storage/logs/laravel.log-20190425
switching euid to 0 and egid to 0

ベストアンサー1

Cronがインストールされていること/ Cron Jobがあることを確認する必要があります。

おすすめ記事