PHP Class ExceptionLogRoute

The log files are stored under {@link setLogPath logPath} and the file name is specified by {@link setLogFile logFile}. If the size of the log file is greater than {@link setMaxFileSize maxFileSize} (in kilo-bytes), a rotation is performed, which renames the current log file by suffixing the file name with '.1'. All existing log files are moved backwards one place, i.e., '.2' to '.3', '.1' to '.2'. The property {@link setMaxLogFiles maxLogFiles} specifies how many files to be kept.
Since: 1.0
Author: Qiang Xue ([email protected])
Inheritance: extends CLogRoute
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство Type Description
$adminEmail
$emailSubject
$exclude_regex
$useragent_regex

Méthodes publiques

Méthode Description
getLogFile ( ) : string
getLogPath ( ) : string
getMaxFileSize ( ) : integer
getMaxLogFiles ( ) : integer
init ( ) Initializes the route.
isFiltered ( $msg )
setLogFile ( string $value )
setLogPath ( string $value )
setMaxFileSize ( integer $value )
setMaxLogFiles ( integer $value )
userAgentFiltered ( $useragent )

Méthodes protégées

Méthode Description
processLogs ( array $logs ) Saves log messages in files.
rotateFiles ( ) Rotates log files.

Method Details

getLogFile() public méthode

public getLogFile ( ) : string
Résultat string log file name. Defaults to 'application.log'.

getLogPath() public méthode

public getLogPath ( ) : string
Résultat string directory storing log files. Defaults to application runtime path.

getMaxFileSize() public méthode

public getMaxFileSize ( ) : integer
Résultat integer maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB).

getMaxLogFiles() public méthode

public getMaxLogFiles ( ) : integer
Résultat integer number of files used for rotation. Defaults to 5.

init() public méthode

This method is invoked after the route is created by the route manager.
public init ( )

isFiltered() public méthode

public isFiltered ( $msg )

processLogs() protected méthode

Saves log messages in files.
protected processLogs ( array $logs )
$logs array list of log messages

rotateFiles() protected méthode

Rotates log files.
protected rotateFiles ( )

setLogFile() public méthode

public setLogFile ( string $value )
$value string log file name

setLogPath() public méthode

public setLogPath ( string $value )
$value string directory for storing log files.

setMaxFileSize() public méthode

public setMaxFileSize ( integer $value )
$value integer maximum log file size in kilo-bytes (KB).

setMaxLogFiles() public méthode

public setMaxLogFiles ( integer $value )
$value integer number of files used for rotation.

userAgentFiltered() public méthode

public userAgentFiltered ( $useragent )

Property Details

$adminEmail public_oe property

public $adminEmail

$emailSubject public_oe property

public $emailSubject

$exclude_regex public_oe property

public $exclude_regex

$useragent_regex public_oe property

public $useragent_regex