Garbage collection & logs Garbage collection & logs
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Garbage collection & logs

Started by gandhi51, September 02, 2006, 09:41:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gandhi51

Hi!

All my logs but global.inc.php are automaticaly deleted by "garbage collection" every 2 or 3 days.
Is there a script in coppermine which does this?

[edit] I have this problem since i have discover coppermine (v1.4.8). Same thing with cpg1.4.9 [/edit]

Thank you for your help.

See some line of my global.inc.php:
QuoteGarbage collection deleted logs/access.log.php at September 1, 2006, 1:00 pm
Garbage collection deleted logs/security.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/database.log.php at September 2, 2006, 8:45 pm

Gandhi51.
Sans douceur, pas de torture ?

studeo

I have this same problem and i would like to keep the log files much longer. Is this a function of coppermine or the server setup?

Thanks

Tranz

I found out the same thing a few days. So I changed the code in include/logger.inc.php. It's only been a few days so I don't know what the consequences, if any, are yet.

FIND:
function& spring_cleaning($directory_path, $cache_time = CPG_HOUR, $exclusion_list = array('index.html')) {

REPLACE with:
function& spring_cleaning($directory_path, $cache_time = CPG_WEEK, $exclusion_list = array('index.html')) {

studeo

OK, I'll give that a try and report back if it stops the automatic deletes.

Thanks

gandhi51

I don't think that the server automaticaly delete the logs. I copied the file security.log.php in another directory. This file was never deleted. The others *.log.php in my coppermine directory was deleted.

I'll try your tips TranzNDance. Report back in a some day. Thank you very much.
Sans douceur, pas de torture ?

Joachim Müller

Well, if you copy those logs somwhere else, the garbage collection will of course not delete them ;D.

Tranz

Exactly.

Should this be an option in the next version?

Joachim Müller

I don't think so. If an admin copies the log to what he thinks a safe place, the script shouldn't mess with it. Same thing goes for renaming of log files. The gargabe collection should imo delete the files it can expect to be generated automatically. Everything it didn't create mustn't be deleted by it.

studeo

Then how about an option to turn off  - or set the timing of - garbage collection - that could be a solution. Allow the admin delete the files at any point he/she desires.

studeo

OK so its one day later and all log files were 'collected' as garbage except the database log (so far)

Just a report back to you as I promised.

Tranz

Thanks for the update. My security log from 9-3 is still there. My database log got deleted.

studeo

Actually, my access log still holds entries from 7/4  even though it read as 0 bytes....so just the global and the security logs were wiped clean.

gandhi51

Quote from: GauGau on September 07, 2006, 06:24:59 AM
Everything it didn't create mustn't be deleted by it.

_However, each time i upload a file .htaccess with the logs, this one is deleted with the logs...

_Report: my logs are deleted again, even with the code change.

See my global.inc.php:
QuoteGarbage collection deleted logs/access.log.php at September 1, 2006, 1:00 pm
Garbage collection deleted logs/security.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/database.log.php at September 2, 2006, 8:45 pm
Garbage collection deleted logs/.htaccess at September 4, 2006, 12:46 am
Garbage collection deleted logs/security.log.php at September 4, 2006, 9:24 pm
Garbage collection deleted logs/database.log.php at September 5, 2006, 10:43 pm
Garbage collection deleted logs/.htaccess at September 6, 2006, 10:56 pm
Plugin 'Filetypes editor' installed at September 7, 2006, 2:24 am
Garbage collection deleted logs/access.log.php at September 8, 2006, 12:41 am
Garbage collection deleted logs/security.log.php at September 8, 2006, 1:30 pm
Sans douceur, pas de torture ?

studeo

Sept. 11

All log files were deleted again.

Just an update.