forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Coppermine_secure on October 26, 2010, 02:24:47 pm

Title: Garbage collection deleted logs
Post by: Coppermine_secure on October 26, 2010, 02:24:47 pm
I just noticed that Coppermine has some sort of mechanism for deleting logs, and I am unable to find out how the decisions are made to do so: ??
Are they deleted after a certain amount of time? or when the log file gets to a certain size?

I have been monitoring logs on my site, and after having been away for a week or so, when I got back and logged in, I expected to see a lot of activity, but what
I saw was empty log files and the message:

"Garbage collection deleted logs"


And the previous logs that were there are all absent.

I found one posting on this site that attempted to explain this, but it was no help. Found here (http://forum.coppermine-gallery.net/index.php?topic=49974.0;prev_next=next)

Anyone here know anything about this?  I tried to find some setting to modify or effect some sort of more control over this action, but I was unable to locate or find any mechanism or action within coppermine to gain any control over the deletion of the log files.  I am still in the dark as to why they were deleted in the first place.

I would like to be able to view the logs before some mechanism deletes them all.  Is there any way to have them emailed to me before they are deleted?

 ???
Title: Re: Garbage collection deleted logs
Post by: Αndré on October 29, 2010, 11:34:00 am
It's located in include/init.inc.php:
Code: [Select]
if ($CONFIG['log_mode']) {
    spring_cleaning('logs', CPG_DAY * 2, array('log_header.inc.php'));
}

The second parameter defines the time which recognizes a file as 'old' and deletes it. If a log file hasn't updated in the last 2 days, it will be deleted. Either you increase that time or comment out that line if you want to disable garbage collection for log files.
Title: Re: Garbage collection deleted logs
Post by: Coppermine_secure on October 29, 2010, 08:20:55 pm
Many Thanks.

Could future releases of coppermine allow for this adjustment in the config window?
Title: Re: Garbage collection deleted logs
Post by: Αndré on October 29, 2010, 08:59:20 pm
Could future releases of coppermine allow for this adjustment in the config window?
Please start a new thread in the feature requests board.