New answers tagged logrotate
The argument to logrotate is supposed to be a configuration file, hence the errors about test.log being a malformed configuration file. Try: logrotate -f /etc/logrotate.conf If that doesn't work, you may try with debug logging turned on using the -d options. Finally, I've run into cases where the only way to coax logrotate into rotating the log file is ...
The error is giving you a hint to the problem. How did you create this logrotate file? The file might have bad data or carriage returns in it. I would recommend reviewing this answer for suggestions on how to check your file. Or at the very least recreate the file yourself. If you copied and pasted the contents into that file, something might have snuck in ...
On my CentOS 6.5 machine for setting up logrotatefor nginx I had to do this: logrotate /etc/logrotate.d/nginx And then I checked if logrotate taking care of my new nginx config like this: cat /var/lib/logrotate.status
Top 50 recent answers are included