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.
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
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')) {
OK, I'll give that a try and report back if it stops the automatic deletes.
Thanks
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.
Well, if you copy those logs somwhere else, the garbage collection will of course not delete them ;D.
Exactly.
Should this be an option in the next version?
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.
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.
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.
Thanks for the update. My security log from 9-3 is still there. My database log got deleted.
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.
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
Sept. 11
All log files were deleted again.
Just an update.