PHP Trait Vimeo\ABLincoln\Experiments\Logging\PSRLoggerTrait

Inheritance: use trait Psr\Log\LoggerAwareTrait
显示文件 Open project: vimeo/ablincoln

Protected Properties

Property Type Description
$ALLOWED_LOG_LEVELS
$log_level

Public Methods

Method Description
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.

Protected Methods

Method Description
_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).

Method Details

_configureLogger() protected method

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() protected method

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() protected method

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() public method

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

Property Details

$ALLOWED_LOG_LEVELS protected_oe property

protected $ALLOWED_LOG_LEVELS

$log_level protected_oe property

protected $log_level