Class LoggerAppenderRollingFile

Description

LoggerAppenderRollingFile extends LoggerAppenderFile to backup the log files when they reach a certain size.

LoggerAppenderRollingFile extends LoggerAppenderFile to backup the log files when they reach a certain size. Parameters are $maxFileSize, $maxBackupIndex

Located in Program_Root/log4php/appenders/LoggerAppenderRollingFile.php (line 39)

LoggerAppender
   |
   --LoggerAppenderSkeleton
      |
      --LoggerAppenderFile
         |
         --LoggerAppenderRollingFile
Variable Summary
Method Summary
LoggerAppenderRollingFile LoggerAppenderRollingFile (string $name)
void append (mixed $event)
integer getExpandedFileName ()
integer getMaxBackupIndex ()
integer getMaximumFileSize ()
void rollOver ()
void setFileName (mixed $fileName)
void setMaxBackupIndex (mixed $maxBackups)
void setMaxFileSize (mixed $value)
void setMaximumFileSize (mixed $maxFileSize)
Variables
mixed $expandedFileName = null (line 68)
integer $maxBackupIndex = 1 (line 66)

Set the maximum number of backup files to keep around.

Set the maximum number of backup files to keep around. The MaxBackupIndex option determines how many backup files are kept before the oldest is erased. This option takes a positive integer value. If set to zero, then there will be no backup files and the log file will be truncated when it reaches MaxFileSize.

There is one backup file by default.

integer $maxFileSize = 10485760 (line 53)

Set the maximum size that the output file is allowed to reach before being rolled over to backup files.

Set the maximum size that the output file is allowed to reach before being rolled over to backup files. In configuration files, the MaxFileSize option takes an long integer in the range 0 - 2^63. You can specify the value with the suffixes "KB", "MB" or "GB" so that the integer is interpreted being expressed respectively in kilobytes, megabytes or gigabytes. For example, the value "10KB" will be interpreted as 10240.

The default maximum file size is 10MB.

Inherited Variables

Inherited from LoggerAppenderFile

LoggerAppenderFile::$append
LoggerAppenderFile::$fileName

Inherited from LoggerAppenderSkeleton

LoggerAppenderSkeleton::$closed
LoggerAppenderSkeleton::$errorHandler
LoggerAppenderSkeleton::$headFilter
LoggerAppenderSkeleton::$layout
LoggerAppenderSkeleton::$name
LoggerAppenderSkeleton::$tailFilter
LoggerAppenderSkeleton::$threshold
Methods
Constructor LoggerAppenderRollingFile (line 75)

Constructor.

Constructor.

LoggerAppenderRollingFile LoggerAppenderRollingFile (string $name)
  • string $name: appender name
append (line 203)
void append (mixed $event)

Redefinition of:
LoggerAppenderFile::append()
getExpandedFileName (line 84)

Returns the value of the MaxBackupIndex option.

Returns the value of the MaxBackupIndex option.

integer getExpandedFileName ()
getMaxBackupIndex (line 92)

Returns the value of the MaxBackupIndex option.

Returns the value of the MaxBackupIndex option.

integer getMaxBackupIndex ()
getMaximumFileSize (line 101)

Get the maximum size that the output file is allowed to reach before being rolled over to backup files.

Get the maximum size that the output file is allowed to reach before being rolled over to backup files.

integer getMaximumFileSize ()
rollOver (line 113)

Implements the usual roll over behaviour.

Implements the usual roll over behaviour. If MaxBackupIndex is positive, then files File.1, ..., File.MaxBackupIndex -1 are renamed to File.2, ..., File.MaxBackupIndex. Moreover, File is renamed File.1 and closed. A new File is created to receive further log output.

If MaxBackupIndex is equal to zero, then the File is truncated with no backup files created.

void rollOver ()
setFileName (line 145)
void setFileName (mixed $fileName)

Redefinition of:
LoggerAppenderFile::setFileName()
setMaxBackupIndex (line 162)

Set the maximum number of backup files to keep around.

Set the maximum number of backup files to keep around. The MaxBackupIndex option determines how many backup files are kept before the oldest is erased. This option takes a positive integer value. If set to zero, then there will be no backup files and the log file will be truncated when it reaches MaxFileSize.

void setMaxBackupIndex (mixed $maxBackups)
setMaxFileSize (line 188)

Set the maximum size that the output file is allowed to reach before being rolled over to backup files.

Set the maximum size that the output file is allowed to reach before being rolled over to backup files. In configuration files, the MaxFileSize option takes an long integer in the range 0 - 2^63. You can specify the value with the suffixes "KB", "MB" or "GB" so that the integer is interpreted being expressed respectively in kilobytes, megabytes or gigabytes. For example, the value "10KB" will be interpreted as 10240.

void setMaxFileSize (mixed $value)
setMaximumFileSize (line 173)

Set the maximum size that the output file is allowed to reach before being rolled over to backup files.

Set the maximum size that the output file is allowed to reach before being rolled over to backup files.

void setMaximumFileSize (mixed $maxFileSize)

Inherited Methods

Inherited From LoggerAppenderFile

LoggerAppenderFile::LoggerAppenderFile()
LoggerAppenderFile::activateOptions()
LoggerAppenderFile::append()
LoggerAppenderFile::close()
LoggerAppenderFile::closeFile()
LoggerAppenderFile::getAppend()
LoggerAppenderFile::getFile()
LoggerAppenderFile::getFileName()
LoggerAppenderFile::reset()
LoggerAppenderFile::setAppend()
LoggerAppenderFile::setFile()
LoggerAppenderFile::setFileName()

Inherited From LoggerAppenderSkeleton

LoggerAppenderSkeleton::LoggerAppenderSkeleton()
LoggerAppenderSkeleton::activateOptions()
LoggerAppenderSkeleton::addFilter()
LoggerAppenderSkeleton::append()
LoggerAppenderSkeleton::clearFilters()
LoggerAppenderSkeleton::close()
LoggerAppenderSkeleton::doAppend()
LoggerAppenderSkeleton::finalize()
LoggerAppenderSkeleton::getErrorHandler()
LoggerAppenderSkeleton::getFilter()
LoggerAppenderSkeleton::getFirstFilter()
LoggerAppenderSkeleton::getLayout()
LoggerAppenderSkeleton::getName()
LoggerAppenderSkeleton::getThreshold()
LoggerAppenderSkeleton::isAsSevereAsThreshold()
LoggerAppenderSkeleton::requiresLayout()
LoggerAppenderSkeleton::setErrorHandler()
LoggerAppenderSkeleton::setLayout()
LoggerAppenderSkeleton::setName()
LoggerAppenderSkeleton::setThreshold()

Inherited From LoggerAppender

LoggerAppender::factory()
LoggerAppender::singleton()

Documentation generated on Wed, 10 Sep 2003 22:44:26 +0200 by phpDocumentor 1.2.2