I have two questions related to developing configuration files for the logrotate tool on Linux systems.
When I make a change to a file in /etc/logrotate.d
, do I need to
somehow notify logrotate so that it will recognize and respond to
the change? It seems to notice changes on its own, eventually, but
when testing log rotation specifications it would be useful to force
logrotate to react to a new configuration file, rather than waiting
for it to next run. Is this possible?
If there is a problem in my logrotate configuration file, are errors reported and if so where can I find them?
Also, if there are common development patterns and techniques to follow when developing logrotate configuration files, please share them. If it matters, I am using Ubuntu 10.04.
include /etc/logrotate.d
so it is automatically updated when you change/add files in tha directory.
logrotate -f /etc/logrotate.conf can let it run.
Logrotate.conf is executed as a cron job in linux, So u dont need to update any other file after changing /etc/logrotate.d You can run it forcefully by using the command "logrotate -f /etc/logrotate.conf", or else if you dont want to run it and just want to check for the errors or the possible outcome of your changes, you can run it with --d option "logrotate -d /etc/logrotate.conf". I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With