PHP Class Airship\Engine\Ledger

Logs messages in the appropriate ledger storage device.
Inheritance: implements LoggerInterface
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$storage

Public Methods

Method Description
__construct ( Airship\Engine\Contract\LedgerStorageInterface $storage = null, $args ) Ledger constructor.
alert ( string $message, array $context = [] ) : mixed Store an ALERT message
critical ( string $message, array $context = [] ) : mixed Store a CRITICAL message
debug ( string $message, array $context = [] ) : mixed Store a DEBUG message
defaultContext ( ) : array All things equal, this information should be included.
emergency ( string $message, array $context = [] ) : mixed Store an EMERGENCY message
error ( string $message, array $context = [] ) : mixed Store an ERROR message
info ( string $message, array $context = [] ) : mixed Store a INFO message
log ( string $level, string $message, array $context = [] ) : mixed Log a message, optionally sign and seal it, if you passed the right keys to the constructor.
notice ( string $message, array $context = [] ) : mixed Store a NOTICE message
warning ( string $message, array $context = [] ) : mixed Store a WARNING message

Method Details

__construct() public method

Ledger constructor.
public __construct ( Airship\Engine\Contract\LedgerStorageInterface $storage = null, $args )
$storage Airship\Engine\Contract\LedgerStorageInterface
$args

alert() public method

Store an ALERT message
public alert ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

critical() public method

Store a CRITICAL message
public critical ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

debug() public method

Store a DEBUG message
public debug ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

defaultContext() public method

All things equal, this information should be included.
public defaultContext ( ) : array
return array

emergency() public method

Store an EMERGENCY message
public emergency ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

error() public method

Store an ERROR message
public error ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

info() public method

Store a INFO message
public info ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

log() public method

Log a message, optionally sign and seal it, if you passed the right keys to the constructor.
public log ( string $level, string $message, array $context = [] ) : mixed
$level string
$message string
$context array
return mixed

notice() public method

Store a NOTICE message
public notice ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

warning() public method

Store a WARNING message
public warning ( string $message, array $context = [] ) : mixed
$message string
$context array
return mixed

Property Details

$storage protected property

protected $storage