PHP Class Kraken\Log\Logger

Inheritance: implements Kraken\Log\LoggerInterface, use trait Kraken\Util\Enum\EnumTrait
Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$logger LoggerWrapper

Public Methods

Method Description
__construct ( string $name, Kraken\Log\Handler\HandlerInterface[] $loggers = [], callable[] $processors = [] )
__destruct ( )
alert ( string $message, array $context = [] ) : boolean Add a log record at the ALERT level.
critical ( string $message, array $context = [] ) : boolean Add a log record at the CRITICAL level.
debug ( string $message, array $context = [] ) : boolean Add a log record at the DEBUG level.
emergency ( string $message, array $context = [] ) : boolean Add a log record at the EMERGENCY level.
error ( string $message, array $context = [] ) : boolean Add a log record at the ERROR level.
getHandlers ( )
getLevelName ( $level )
getLevels ( )
getName ( )
getProcessors ( )
info ( string $message, array $context = [] ) : boolean Add a log record at the INFO level.
isHandling ( $level )
log ( integer | string $level, string $message, array $context = [] ) : boolean Add a log record at an arbitrary level.
notice ( string $message, array $context = [] ) : boolean Add a log record at the NOTICE level.
popHandler ( )
popProcessor ( )
pushHandler ( Kraken\Log\Handler\HandlerInterface $handler )
pushProcessor ( callable $callback )
warning ( string $message, array $context = [] ) : boolean Add a log record at the WARNING level.

Protected Methods

Method Description
createWrapper ( string $name, Kraken\Log\Handler\HandlerInterface[] $loggers, callable[] $processors ) : LoggerWrapper

Method Details

__construct() public method

public __construct ( string $name, Kraken\Log\Handler\HandlerInterface[] $loggers = [], callable[] $processors = [] )
$name string
$loggers Kraken\Log\Handler\HandlerInterface[]
$processors callable[]

__destruct() public method

public __destruct ( )

alert() public method

This method allows for compatibility with common interfaces.
public alert ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

createWrapper() protected method

protected createWrapper ( string $name, Kraken\Log\Handler\HandlerInterface[] $loggers, callable[] $processors ) : LoggerWrapper
$name string
$loggers Kraken\Log\Handler\HandlerInterface[]
$processors callable[]
return LoggerWrapper

critical() public method

This method allows for compatibility with common interfaces.
public critical ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

debug() public method

This method allows for compatibility with common interfaces.
public debug ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

emergency() public method

This method allows for compatibility with common interfaces.
public emergency ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

error() public method

This method allows for compatibility with common interfaces.
public error ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

getHandlers() public method

public getHandlers ( )

getLevelName() public method

public getLevelName ( $level )

getLevels() public method

public getLevels ( )

getName() public method

public getName ( )

getProcessors() public method

public getProcessors ( )

info() public method

This method allows for compatibility with common interfaces.
public info ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

isHandling() public method

public isHandling ( $level )

log() public method

This method allows for compatibility with common interfaces.
public log ( integer | string $level, string $message, array $context = [] ) : boolean
$level integer | string
$message string
$context array
return boolean

notice() public method

This method allows for compatibility with common interfaces.
public notice ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

popHandler() public method

public popHandler ( )

popProcessor() public method

public popProcessor ( )

pushHandler() public method

public pushHandler ( Kraken\Log\Handler\HandlerInterface $handler )
$handler Kraken\Log\Handler\HandlerInterface

pushProcessor() public method

public pushProcessor ( callable $callback )
$callback callable

warning() public method

This method allows for compatibility with common interfaces.
public warning ( string $message, array $context = [] ) : boolean
$message string
$context array
return boolean

Property Details

$logger protected property

protected LoggerWrapper,Kraken\Log $logger
return LoggerWrapper