PHP 클래스 Elgg\Logger

Use the elgg_* versions instead.
부터: 1.9.0
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$display Display to user?
$hooks PluginHooksService
$level The logging level
$levels

공개 메소드들

메소드 설명
__construct ( PluginHooksService $hooks, Config $config, elgg\Context $context ) Constructor
disable ( ) : void Temporarily disable logging and capture logs (before tests)
dump ( mixed $data, boolean $display = true ) : void Dump data to log or screen
enable ( ) : array Restore logging and get record of log calls (after tests)
error ( string $message ) : boolean Log message at the ERROR level
getLevel ( ) : integer Get the current logging level
info ( string $message ) : boolean Log message at the INFO level
log ( string $message, integer $level = self::NOTICE ) : boolean Add a message to the log
notice ( string $message ) : boolean Log message at the NOTICE level
setDisplay ( boolean $display ) : void Set whether the logging should be displayed to the user
setHooks ( PluginHooksService $hooks ) : void Reset the hooks service for this instance (testing)
setLevel ( integer $level ) : void Set the logging level
warn ( string $message ) : boolean Log message at the WARNING level

보호된 메소드들

메소드 설명
process ( mixed $data, boolean $display, integer $level ) : void Process logging data

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( PluginHooksService $hooks, Config $config, elgg\Context $context )
$hooks PluginHooksService Hooks service
$config Config Config service
$context elgg\Context Context service

disable() 공개 메소드

Call disable() before your tests and enable() after. enable() will return a list of calls to log() (and helper methods) that were not acted upon.
또한 보기: enable
public disable ( ) : void
리턴 void

dump() 공개 메소드

Dump data to log or screen
public dump ( mixed $data, boolean $display = true ) : void
$data mixed The data to log
$display boolean Whether to include this in the HTML page
리턴 void

enable() 공개 메소드

Restore logging and get record of log calls (after tests)
또한 보기: disable
public enable ( ) : array
리턴 array

error() 공개 메소드

Log message at the ERROR level
public error ( string $message ) : boolean
$message string The message to log
리턴 boolean

getLevel() 공개 메소드

Get the current logging level
public getLevel ( ) : integer
리턴 integer

info() 공개 메소드

Log message at the INFO level
public info ( string $message ) : boolean
$message string The message to log
리턴 boolean

log() 공개 메소드

Add a message to the log
public log ( string $message, integer $level = self::NOTICE ) : boolean
$message string The message to log
$level integer The logging level
리턴 boolean Whether the messages was logged

notice() 공개 메소드

Log message at the NOTICE level
public notice ( string $message ) : boolean
$message string The message to log
리턴 boolean

process() 보호된 메소드

Process logging data
protected process ( mixed $data, boolean $display, integer $level ) : void
$data mixed The data to process
$display boolean Whether to display the data to the user. Otherwise log it.
$level integer The logging level for this data
리턴 void

setDisplay() 공개 메소드

Whether data is actually displayed to the user depends on this setting and other factors such as whether we are generating a JavaScript or CSS file.
public setDisplay ( boolean $display ) : void
$display boolean Whether to display logging
리턴 void

setHooks() 공개 메소드

Reset the hooks service for this instance (testing)
public setHooks ( PluginHooksService $hooks ) : void
$hooks PluginHooksService
리턴 void

setLevel() 공개 메소드

Set the logging level
public setLevel ( integer $level ) : void
$level integer The logging level
리턴 void

warn() 공개 메소드

Log message at the WARNING level
public warn ( string $message ) : boolean
$message string The message to log
리턴 boolean

프로퍼티 상세

$display 보호되어 있는 프로퍼티

Display to user?
protected $display

$hooks 보호되어 있는 프로퍼티

protected PluginHooksService,elgg $hooks
리턴 PluginHooksService

$level 보호되어 있는 프로퍼티

The logging level
protected $level

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

protected static $levels