PHP 클래스 Prado\Util\TLogRoute

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 {@link setLevels Levels} property, which takes a string of comma-separated desired level names (e.g. 'Error, Debug'). To specify category filter, set {@link 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.
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends Prado\TApplicationComponent
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_levelNames lookup table for level names
$_levelValues lookup table for level values

공개 메소드들

메소드 설명
collectLogs ( TLogger $logger ) Retrieves log messages from logger to log route specific destination.
getCategories ( ) : array
getLevels ( ) : integer
init ( $config ) Initializes the route.
setCategories ( $categories )
setLevels ( $levels )

보호된 메소드들

메소드 설명
formatLogMessage ( $message, $level, $category, $time ) : string Formats a log message given different fields.
getLevelName ( $level ) : string
getLevelValue ( $level ) : integer
processLogs ( $logs ) Processes log messages and sends them to specific destination.

메소드 상세

collectLogs() 공개 메소드

Retrieves log messages from logger to log route specific destination.
public collectLogs ( TLogger $logger )
$logger TLogger

formatLogMessage() 보호된 메소드

Formats a log message given different fields.
protected formatLogMessage ( $message, $level, $category, $time ) : string
리턴 string formatted message

getCategories() 공개 메소드

public getCategories ( ) : array
리턴 array list of categories to be looked for

getLevelName() 보호된 메소드

protected getLevelName ( $level ) : string
리턴 string level name

getLevelValue() 보호된 메소드

protected getLevelValue ( $level ) : integer
리턴 integer level value

getLevels() 공개 메소드

public getLevels ( ) : integer
리턴 integer log level filter

init() 공개 메소드

Initializes the route.
public init ( $config )

processLogs() 추상적인 보호된 메소드

Derived child classes must implement this method.
abstract protected processLogs ( $logs )

setCategories() 공개 메소드

public setCategories ( $categories )

setLevels() 공개 메소드

public setLevels ( $levels )

프로퍼티 상세

$_levelNames 보호되어 있는 정적으로 프로퍼티

lookup table for level names
protected static $_levelNames

$_levelValues 보호되어 있는 정적으로 프로퍼티

lookup table for level values
protected static $_levelValues