Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Garbage collection deleted logs  (Read 2961 times)

0 Members and 1 Guest are viewing this topic.

Coppermine_secure

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Garbage collection deleted logs
« 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?

 ???
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Garbage collection deleted logs
« Reply #1 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.
Logged

Coppermine_secure

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Garbage collection deleted logs
« Reply #2 on: October 29, 2010, 08:20:55 pm »

Many Thanks.

Could future releases of coppermine allow for this adjustment in the config window?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Garbage collection deleted logs
« Reply #3 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 21 queries.