Class TLogRoute
TLogRoute class.
TLogRoute 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 setLevels Levels property, which takes a string of comma-separated desired level names (e.g. 'Error, Debug'). To specify category filter, set setCategories 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.
- TComponent
-
TApplicationComponent
-
TLogRoute
Direct known subclasses
TBrowserLogRoute, TDbLogRoute, TEmailLogRoute, TFileLogRoute, TFirePhpLogRouteIndirect known subclasses
TFirebugLogRoutePackage: System\Util
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Util/TLogRouter.php
public
|
|
public
integer
|
|
public
|
|
public
array
|
|
public
|
|
protected
string
|
|
protected
integer
|
|
protected
string
|
#
formatLogMessage( string $message, integer $level, string $category, integer $time )
Formats a log message given different fields. |
public
|
|
abstract protected
|
#
processLogs( array $logs )
Processes log messages and sends them to specific destination. Derived child classes must implement this method. |
getApplication(),
getRequest(),
getResponse(),
getService(),
getSession(),
getUser(),
publishAsset(),
publishFilePath()
|
GLOBAL_RAISE_EVENT_LISTENER
|
protected static
array
|
$_levelNames | array(
TLogger::DEBUG=>'Debug',
TLogger::INFO=>'Info',
TLogger::NOTICE=>'Notice',
TLogger::WARNING=>'Warning',
TLogger::ERROR=>'Error',
TLogger::ALERT=>'Alert',
TLogger::FATAL=>'Fatal'
) |
#
lookup table for level names |
protected static
array
|
$_levelValues | array(
'debug'=>TLogger::DEBUG,
'info'=>TLogger::INFO,
'notice'=>TLogger::NOTICE,
'warning'=>TLogger::WARNING,
'error'=>TLogger::ERROR,
'alert'=>TLogger::ALERT,
'fatal'=>TLogger::FATAL
) |
#
lookup table for level values |