PHP Трейт Vimeo\ABLincoln\Experiments\Logging\PSRLoggerTrait

Наследование: use trait Psr\Log\LoggerAwareTrait
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$ALLOWED_LOG_LEVELS
$log_level

Открытые методы

Метод Описание
setLogLevel ( string $level ) Set the level at which to log, which must be one of the constants defined in the PSR\Log\LogLevel class. Should be called externally or in the experiment setup() method so that the level is set before the logger gets instantiated.

Защищенные методы

Метод Описание
_configureLogger ( ) PSR logger configuration can either be done outside of the experiment class or within this method if overriden. Either way, the initialized logger should be passed to the experiment via the LoggerAwareTrait's setLogger() method.
_log ( array $data ) Use the logging instance to log an optional message as well as exposure data. The log level may be set by the included setLogLevel() method.
_previouslyLogged ( ) Assume data has never been logged before and this is the first time we are seeing the inputs/outputs given (can be overriden if needed).

Описание методов

_configureLogger() защищенный Метод

PSR logger configuration can either be done outside of the experiment class or within this method if overriden. Either way, the initialized logger should be passed to the experiment via the LoggerAwareTrait's setLogger() method.
protected _configureLogger ( )

_log() защищенный Метод

Use the logging instance to log an optional message as well as exposure data. The log level may be set by the included setLogLevel() method.
protected _log ( array $data )
$data array exposure log data to record

_previouslyLogged() защищенный Метод

Assume data has never been logged before and this is the first time we are seeing the inputs/outputs given (can be overriden if needed).
protected _previouslyLogged ( )

setLogLevel() публичный Метод

Set the level at which to log, which must be one of the constants defined in the PSR\Log\LogLevel class. Should be called externally or in the experiment setup() method so that the level is set before the logger gets instantiated.
public setLogLevel ( string $level )
$level string PSR level at which to log

Описание свойств

$ALLOWED_LOG_LEVELS защищенное свойство

protected $ALLOWED_LOG_LEVELS

$log_level защищенное свойство

protected $log_level