Log file rotation

Author Message

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

Andrew Kelly

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 rolling
off 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 taking
one on the nose if I change those to values to 5 Mb and 10 rotations?

Andy

Paul Forsyth

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

Andrew Kelly

Monday 12 December 2005 5:38:44 am

Great, thanks for the info!

Andy

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.