log rotate not working.

I have the log rotate frequency set to weekly. But when I use the log browser, it looks like the log goes back many many months. If my understanding is correct, I should see archive files in the directory but at most log entries going back a week only.  Is this correct?  Also ( and I have problems with the search facility a lot ) I cannot find the log rotate plugin. I want to see if there is a new version or if this problem has been addressed.

  • The logrotate plugin is an Elgg core plugin. So, you won't find it here in the plugin repository. But when you use the latest Elgg release, you have the latest version of the logrotate plugin, too.

    Is your weekly cronjob set up and running? If in doubt, you can use the Croncheck plugin to monitor the cronjobs: http://community.elgg.org/plugins/484590/2.0.1/croncheck. After activating the croncheck plugin you will see when the different cronjobs were running last - starting from the time you activated the croncheck plugin, so it could take up to 1 week until you know if the weekly cronjob is running or not. But if you see the other cronjobs with shorter intervals getting executed, it's an indication that the cronjobs are likely to run. If you already see that the 1 minute cronjob is not running, it's quite likely that the weekly cronjob won't run either. Check the crondaemon config then. Are the Elgg cronjobs defined?

    You can also execute the weekly cronjob manually by calling http://<yoursite.url/cron/weekly. Then you also see the cronjob output on screen. Though it might take a while for the job to finish if it really hasn't run for months.

    The archived logs are not to be found in the logrotate plugin folder. There is only a new table created in your database with the archived log entries (elggsystem_log_<timestamp>). These tables will get removed from the database again if they are older than the time set up in the logrotate plugin settings for keeping of archived logs. Well, actually there seems a bug with deleting the archived log tabled, i.e. they currently won't get removed. But this issue will be fixed in Elgg 1.8.16: https://github.com/Elgg/Elgg/issues/5490.