Class CFileLogRoute
CFileLogRoute records log messages in files.
The log files are stored under setLogPath logPath and the file name
is specified by setLogFile logFile. If the size of the log file is
greater than 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 setMaxLogFiles maxLogFiles specifies how many
files to be kept. If the property CFileLogRoute::$rotateByCopy
is true, the primary log
file will be rotated by a copy and truncated (to be more compatible with log
tailers) otherwise it will be rotated by being renamed.
- CComponent
- CLogRoute
- CFileLogRoute
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/logging/CFileLogRoute.php
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
integer
|
|
public
|
|
public
integer
|
|
public
|
|
protected
|
|
protected
|
collectLogs(),
formatLogMessage()
|
public
boolean
|
$rotateByCopy | false |
#
Whether to rotate primary log by copy and truncate which is more compatible with log tailers. Defaults to false. |
$categories,
$enabled,
$except,
$filter,
$levels,
$logs
|
public
string
|
$logPath |
#
Directory storing log files. Defaults to application runtime path. |
public
string
|
$logFile |
#
Log file name. Defaults to 'application.log'. |
public
integer
|
$maxFileSize |
#
Maximum log file size in kilo-bytes (KB). Defaults to 1024 (1MB). |
public
integer
|
$maxLogFiles |
#
Number of files used for rotation. Defaults to 5. |