Standard Log Store Duration

Standard Log Store Duration

by Mayank Tyagi -
Number of replies: 4

Hi Folks,

I need one information.  I wanna fetch some data from the site log reports (1 or 2 years). But there is only 5 months data available in the log report. Even in the database (prefix_logstore_standard_log) the last timecreated value is 18 June 2019. Is there any criteria in the moodle log store (any time range) ? Or there is some problem in my site ? I am using moodle 3.2.I want to fetch one year data. My site created probably in 2017. 


Average of ratings: -
In reply to Mayank Tyagi

Re: Standard Log Store Duration

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Yes, there is a time range setting. For Moodle 3.2, go to Site administration > Plugins > Logging > Standard log and look at the setting, Keep logs for. I suspect yours is not set to the default, Never delete logs.

Sadly, if the data is not in the database, you will not be able to fetch it.

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Standard Log Store Duration

by Mayank Tyagi -

I dont know where is the problem. The keep logs for option is already on default setting "Never delete logs". May be before me some one delete logs. Or there is some another issue. What say? 

In reply to Mayank Tyagi

Re: Standard Log Store Duration

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have been using Moodle since 2008, and the log files have always honored my "never delete" setting. I would suggest that you make note, right now, of your oldest entry date and time. Then, in a month or so, check again to verify that this oldest entry is still in the log table.
In reply to Mayank Tyagi

Re: Standard Log Store Duration

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Look at those oldest log entries and see who made them. Try to see if the people referred to in the entries can tell you anything about what may have happened to your site around that time. Also, someone may have made changes and then changed the settings back.