PHP Class Elastica\Log

Author: Nicolas Ruflin ([email protected])
Inheritance: extends Psr\Log\AbstractLogger
Mostra file Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_lastMessage Last logged message.
$_log string | boolean Log path or true if enabled.

Public Methods

Method Description
__construct ( $log = '' ) Inits log object.
getLastMessage ( ) : string Return last logged message.
log ( mixed $level, string $message, array $context = [] ) : null | void Log a message.
setLog ( boolean | string $log ) Enable/disable log or set log path.

Method Details

__construct() public method

Inits log object.
public __construct ( $log = '' )

getLastMessage() public method

Return last logged message.
public getLastMessage ( ) : string
return string Last logged message

log() public method

Log a message.
public log ( mixed $level, string $message, array $context = [] ) : null | void
$level mixed
$message string
$context array
return null | void

setLog() public method

Enable/disable log or set log path.
public setLog ( boolean | string $log )
$log boolean | string Enables log or sets log path

Property Details

$_lastMessage protected_oe property

Last logged message.
protected $_lastMessage

$_log protected_oe property

Log path or true if enabled.
protected string|bool $_log
return string | boolean