Forums / General / Log file rotation
Andrew Kelly
Friday 09 December 2005 2:14:24 am
Hi all,
can anybody explain to me the process that rotates the log files in var/log?I'm seeing rotation at very odd intervals.
Thanks.Andy
Paul Forsyth
Friday 09 December 2005 11:46:41 am
It looks like there are two settings for this but both are identical:
lib/ezfile/classes/ezlog.php:
define( "EZ_MAX_LOGROTATE_FILES", 3 );define( "EZ_MAX_LOGFILE_SIZE", 200*1024 );
lib/ezutils/classes/ezdebug.php:
define( "EZ_DEBUG_MAX_LOGFILE_SIZE", 200*1024 );define( "EZ_DEBUG_MAX_LOGROTATE_FILES", 3 );
paul
Monday 12 December 2005 2:59:24 am
Thanks for the reply, Paul.
So if I'm reading and understanding correctly, there are no ini settings to control the behavior, it's defined directly in the class files. And the definitions are to rotate at 200 Kb and only keep 3 "older logfiles". Am I getting it?
If so, blaaa!
I just went live with a site and was having useful error data rollingoff the "back side" within a quarter hour. Not groovy.
Ok, if these limits are set in classes and have no ini control, am I correct in assuming that there is a good reason for this? Will I, for example, be takingone on the nose if I change those to values to 5 Mb and 10 rotations?
Andy
Monday 12 December 2005 3:20:26 am
Yes, it is somewhat hard coded.
If you up the values the only issue should be disk space. So, its pretty safe.
Paul
Monday 12 December 2005 5:38:44 am
Great, thanks for the info!