1

Logrotate will rotate the logs but when it renames the file to .1 (and then subsequently to .2.gz, .3.gz, etc) the files are empty. I've tracked this down to the path specified in the log config file:

/hosts/*/log/*.log

If I change the above line to one specific directory such as:

/hosts/website-1/log/*.log

Logrotate starts working properly. Nothing else in the configuration is changed and I'm testing it using the command logrotate -f /etc/logrotate.d/hosts.

I know I can list multiple directories for the logs individually but it would be easier if the first line would work. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.