Class CLogRoute
CLogRoute is the base class for all log route classes.
A log route object retrieves log messages from a logger and sends it somewhere, such as files, emails. The messages being retrieved may be filtered first before being sent to the destination. The filters include log level filter and log category filter.
To specify level filter, set CLogRoute::$levels
property, which takes a string of
comma-separated desired level names (e.g. 'Error, Debug'). To specify category
filter, set CLogRoute::$categories
property, which takes a string of comma-separated
desired category names (e.g. 'System.Web, System.IO').
Level filter and category filter are combinational, i.e., only messages satisfying both filter conditions will they be returned.
- CComponent
- CLogRoute
Indirect known subclasses
CProfileLogRoutePackage: system\logging
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/CLogRoute.php
public
|
|
protected
string
|
#
formatLogMessage( string $message, integer $level, string $category, integer $time )
Formats a log message given different fields. |
public
|
#
collectLogs(
Retrieves filtered log messages from logger for further processing. |
abstract protected
|
#
processLogs( array $logs )
Processes log messages and sends them to specific destination. Derived child classes must implement this method. |
public
boolean
|
$enabled | true |
#
whether to enable this log route. Defaults to true. |
public
string
|
$levels | '' |
#
list of levels separated by comma or space. Defaults to empty, meaning all levels. |
public
mixed
|
$categories | array() |
#
array of categories, or string list separated by comma or space. Defaults to empty array, meaning all categories. |
public
mixed
|
$except | array() |
#
array of categories, or string list separated by comma or space, to EXCLUDE from logs. Defaults to empty array, meaning no categories are excluded. This will exclude any categories after $categories has been ran. |
public
mixed
|
$filter |
|
#
the additional filter (eg |
public
array
|
$logs | array() |
#
the logs that are collected so far by this log route. |