logrotate configuration file development and testing logrotate configuration file development and testing linux linux

logrotate configuration file development and testing


  1. since the files in /etc/logrotate.d are included in include /etc/logrotate.d

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.

  1. usually after changing your configuration, you should run it manually once and it will tell you if there is any error. error should by default also go to syslog, normally.


Logrotate.conf is executed as a cron job in linux, So u dont need to update any other file after changing /etc/logrotate.dYou 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.