Class CLogRouter
CLogRouter manages log routes that record log messages in different media.
For example, a file log route CFileLogRoute records log messages in
log files. An email log route CEmailLogRoute sends log messages to
specific email addresses. See CLogRoute for more details about different
log routes.
Log routes may be configured in application configuration like following:
array(
'preload'=>array('log'), // preload log component when app starts
'components'=>array(
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'trace, info',
'categories'=>'system.*',
),
array(
'class'=>'CEmailLogRoute',
'levels'=>'error, warning',
'emails'=>array('admin@example.com'),
),
),
),
),
)
You can specify multiple routes with different filtering conditions and different targets, even if the routes are of the same type.
- CComponent
-
CApplicationComponent
implements
IApplicationComponent
-
CLogRouter
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/CLogRouter.php
public
|
|
public
array
|
|
public
|
|
public
|
#
collectLogs(
Collects log messages from a logger. This method is an event handler to the
|
public
|
#
processLogs( )
Collects and processes log messages from a logger. This method is an event
handler to the |
getIsInitialized()
|
$behaviors
|
public
array
|
$routes |
#
The currently initialized routes. |
$isInitialized
|