Ramifications of trimming the log file

Ramifications of trimming the log file

by Jerry Lau -
Number of replies: 2

Hello folks.


We are on version 3.2.4+ running on RHEL 6.6 64-bit on MySQL 5.5.41.

I noticed that my "mdl_logstore_standard_log" table is huge with about 10 GB of records!

What are the ramifications of trimming it and would it affect anything operational?

Could I just trim it by executing this statement?

DELETE FROM mdl_logstore_standard_log
WHERE timecreated < unix_timestamp(YYYYMMDD)


I would make a backup first before trimming it of course just in case?


Could I limit the size through the administrative options and if so, where is it? (Site Administration -> Plugins -> Logging) correct?

Thoughts?

Thank you.





 

Average of ratings: -
In reply to Jerry Lau

Re: Ramifications of trimming the log file

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you go into the settings for the standard log (Site administration > plugins > Logging) you can set the lifetime of the log. That's the right way to do it...

In reply to Howard Miller

Re: Ramifications of trimming the log file

by Paul Tibbitts -
There seems to be conflicting information about whether setting the retention through the admin interface is immediately retroactive, and reclaims space from entries that would be considered aged-out just as truncating the table directly would. Maybe someone who's reset the retention (lower) recently can clarify.