PHP Class Webiny\Component\Logger\Driver\Webiny

Inheritance: implements Webiny\Component\Logger\Bridge\LoggerDriverInterface, use trait Webiny\Component\StdLib\StdLibTrait
Datei anzeigen Open project: Webiny/Framework

Public Methods

Method Description
__construct ( )
addHandler ( AbstractHandler $handler ) Add handler to logger Handlers are being prepended to the handlers array, so the last added handler will be executed first
alert ( string $message, array $context = [] ) : null Action must be taken immediately.
critical ( string $message, array $context = [] ) : null Critical conditions.
debug ( string $message, array $context = [] ) : null Detailed debug information.
emergency ( string $message, array $context = [] ) : null System is unusable.
error ( string $message, array $context = [] ) : null Runtime errors that do not require immediate action but should typically be logged and monitored.
info ( string $message, array $context = [] ) : null Interesting events.
log ( mixed $level, string $message, array $context = [] ) : null Logs with an arbitrary level.
notice ( string $message, array $context = [] ) : null Normal but significant events.
setName ( string $name ) Set logger name
warning ( string $message, array $context = [] ) : null Exceptional occurrences that are not errors.

Protected Methods

Method Description
addRecord ( integer $level, string $message, array $context = [] ) : boolean Adds a log record.

Method Details

__construct() public method

public __construct ( )

addHandler() public method

Add handler to logger Handlers are being prepended to the handlers array, so the last added handler will be executed first
public addHandler ( AbstractHandler $handler )
$handler Webiny\Component\Logger\Driver\Webiny\Handler\AbstractHandler

addRecord() protected method

Adds a log record.
protected addRecord ( integer $level, string $message, array $context = [] ) : boolean
$level integer The logging level
$message string The log message
$context array The log context
return boolean Whether the record has been processed

alert() public method

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
public alert ( string $message, array $context = [] ) : null
$message string
$context array
return null

critical() public method

Example: Application component unavailable, unexpected exception.
public critical ( string $message, array $context = [] ) : null
$message string
$context array
return null

debug() public method

Detailed debug information.
public debug ( string $message, array $context = [] ) : null
$message string
$context array
return null

emergency() public method

System is unusable.
public emergency ( string $message, array $context = [] ) : null
$message string
$context array
return null

error() public method

Runtime errors that do not require immediate action but should typically be logged and monitored.
public error ( string $message, array $context = [] ) : null
$message string
$context array
return null

info() public method

Example: User logs in, SQL logs.
public info ( string $message, array $context = [] ) : null
$message string
$context array
return null

log() public method

Logs with an arbitrary level.
public log ( mixed $level, string $message, array $context = [] ) : null
$level mixed
$message string
$context array
return null

notice() public method

Normal but significant events.
public notice ( string $message, array $context = [] ) : null
$message string
$context array
return null

setName() public method

Set logger name
public setName ( string $name )
$name string Logger name

warning() public method

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
public warning ( string $message, array $context = [] ) : null
$message string
$context array
return null