eZPublishCommunityProject(LegacyStack)  2013.5
eZLog Class Reference

Public Member Functions

 eZLog ()
 

Static Public Member Functions

static maxLogrotateFiles ()
 
static maxLogSize ()
 
static rotateLog ($fileName)
 
static setLogrotateFiles ($files)
 
static setMaxLogSize ($size)
 
static write ($message, $logName= 'common.log', $dir= 'var/log')
 

Public Attributes

const MAX_LOGFILE_SIZE = 204800
 
const MAX_LOGROTATE_FILES = 3
 

Static Private Member Functions

static writeStorageLog ($name, $dir=false)
 

Member Function Documentation

eZLog::eZLog ( )

Creates a new log object.

static eZLog::maxLogrotateFiles ( )
static
Returns
the maximum number of logrotate files to keep.

Referenced by rotateLog().

static eZLog::maxLogSize ( )
static
Returns
the maximum size for a log file in bytes.

Referenced by write(), and writeStorageLog().

static eZLog::rotateLog (   $fileName)
static

Rotates logfiles so the current logfile is backed up, old rotate logfiles are rotated once more and those that exceed maxLogrotateFiles() will be removed. Rotated files will get the extension .1, .2 etc.

Referenced by eZScriptClusterPurge\run(), eZScriptTrashPurge\run(), write(), and writeStorageLog().

static eZLog::setLogrotateFiles (   $files)
static

Sets the maximum number of logrotate files to keep to $files.

static eZLog::setMaxLogSize (   $size)
static

Sets the maximum size for a log file to $size.

static eZLog::write (   $message,
  $logName = 'common.log',
  $dir = 'var/log' 
)
static
static eZLog::writeStorageLog (   $name,
  $dir = false 
)
staticprivate

Writes file name $name and storage directory $dir to storage log

Referenced by eZINI\loadCache(), eZHTTPFile\store(), and eZPHPCreator\store().

Member Data Documentation

const eZLog::MAX_LOGFILE_SIZE = 204800
const eZLog::MAX_LOGROTATE_FILES = 3

The documentation for this class was generated from the following file: