Class LoggerAppenderRollingFile

(line 25)
LoggerAppender
   |
   --LoggerAppenderFile
      |
      --LoggerAppenderRollingFile

Located in File: Program_Root/appender/LoggerAppenderRollingFile.php


RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.

Class Variable Summary
$maxBackupIndex
There is one backup file by default.
Default Value: ->1<-
$maxFileSize
The default maximum file size is 10MB.
Default Value: ->10485760<-

Inherited Class Variable Summary
Inherited From Class LoggerAppenderFile
Variable Default Value Description
LoggerAppenderFile::$fileAppend ->true <-
LoggerAppenderFile::$fileName -> <-
LoggerAppenderFile::$fp -> <-
LoggerAppenderFile::$requiresLayout ->true <-
Inherited From Class LoggerAppender
Variable Default Value Description
LoggerAppender::$closed -> <-
LoggerAppender::$errorHandler -> <-
LoggerAppender::$filters ->array() <-
LoggerAppender::$headFilter ->null <-
LoggerAppender::$layout ->null <-
LoggerAppender::$name -> <-
LoggerAppender::$tailFilter ->null <-
LoggerAppender::$threshold -> <-

Method Summary
void constructor LoggerAppenderRollingFile ( $name )
The default constructor simply calls its parents constructor.
void doAppend ( $event )
void getMaxBackupIndex ( )
Returns the value of the MaxBackupIndex option.
void getMaximumFileSize ( )
Get the maximum size that the output file is allowed to reach
void rollOver ( )
Implements the usual roll over behaviour.
void setMaxBackupIndex ( $maxBackups )
Set the maximum number of backup files to keep around.
void setMaxFileSize ( $value )
Set the maximum size that the output file is allowed to reach
void setMaximumFileSize ( $maxFileSize )
Set the maximum size that the output file is allowed to reach before being rolled over to backup files.
Inherited Method Summary
Inherited From Class LoggerAppenderFile
Function Description
LoggerAppenderFile::LoggerAppenderFile()
LoggerAppenderFile::activateOptions() If the value of File is not null, then setFile(java.lang.String) is called with the values of File and Append properties.
LoggerAppenderFile::close()
LoggerAppenderFile::closeFile() Closes the previously opened file.
LoggerAppenderFile::doAppend()
LoggerAppenderFile::getAppend() Returns the value of the Append option.
LoggerAppenderFile::getFile() Returns the value of the File option.
LoggerAppenderFile::reset() Close any previously opened file and call the parent's reset.
LoggerAppenderFile::setAppend() The Append option takes a boolean value.
LoggerAppenderFile::setFile() The File property takes a string value which should be the name of the file to append to.
Inherited From Class LoggerAppender
Function Description
LoggerAppender::LoggerAppender() Constructor
LoggerAppender::addFilter() Add a filter to the end of the filter list.
LoggerAppender::clearFilters() Clear the list of filters by removing all the filters in it.
LoggerAppender::close() Release any resources allocated.
LoggerAppender::doAppend() Log in Appender specific way.
LoggerAppender::factory() Factory
LoggerAppender::getErrorHandler() Returns the ErrorHandler for this appender.
LoggerAppender::getFilter() Returns the head Filter.
LoggerAppender::getLayout() Returns this appender layout.
LoggerAppender::getName() Get the name of this appender.
LoggerAppender::requiresLayout() Configurators call this method to determine if the appender requires a layout.
LoggerAppender::setErrorHandler() Set the ErrorHandler for this appender.
LoggerAppender::setLayout() Set the Layout for this appender.
LoggerAppender::setName() Set the name of this appender.
LoggerAppender::singleton() Singleton

Method Detail

Constructor LoggerAppenderRollingFile

(line 40)

void LoggerAppenderRollingFile( mixed $name)

The default constructor simply calls its parents constructor.
Function Info:

[ Top ]


doAppend

(line 149)

void doAppend( mixed $event)

Overrides LoggerAppenderFile::doAppend() (parent method not documented)


Function Info:

[ Top ]


getMaxBackupIndex

(line 48)

void getMaxBackupIndex( )

Returns the value of the MaxBackupIndex option.
Function Info:

[ Top ]


getMaximumFileSize

(line 56)

void getMaximumFileSize( )

Get the maximum size that the output file is allowed to reach

before being rolled over to backup files.

Function Info:

[ Top ]


rollOver

(line 69)

void rollOver( )

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.

Function Info:

[ Top ]


setMaxBackupIndex

(line 109)

void setMaxBackupIndex( mixed $maxBackups)

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.

Function Info:

[ Top ]


setMaxFileSize

(line 135)

void setMaxFileSize( mixed $value)

Set the maximum size that the output file is allowed to reach

before being rolled over to backup files. <p>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.

Function Info:

[ Top ]


setMaximumFileSize

(line 120)

void setMaximumFileSize( mixed $maxFileSize)

Set the maximum size that the output file is allowed to reach before being rolled over to backup files.
Function Info:
see - LoggerAppenderRollingFile::setMaxFileSize()

[ Top ]



Variable Detail

$maxBackupIndex

(line 35)
Data type: mixed
There is one backup file by default.

[ Top ]

$maxFileSize

(line 30)
Data type: mixed
The default maximum file size is 10MB.

[ Top ]



Documention generated on Thu, 20 Feb 2003 15:43:01 +0100 by phpDocumentor 1.2.0rc1