PHP Interface Psr\Log\LoggerInterface

The message MUST be a string or object implementing __toString(). The message MAY contain placeholders in the form: {foo} where foo will be replaced by the context data in key "foo". The context array can contain arbitrary data, the only assumption that can be made by implementors is that if an Exception instance is given to produce a stack trace, it MUST be in a key named "exception".
Afficher le fichier Open project: tboothman/imdbphp Interface Usage Examples

Méthodes publiques

Méthode Description
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.
warning ( string $message, array $context = [] ) : null Exceptional occurrences that are not errors.

Method Details

alert() public méthode

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
Résultat null

critical() public méthode

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

debug() public méthode

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

emergency() public méthode

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

error() public méthode

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
Résultat null

info() public méthode

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

log() public méthode

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

notice() public méthode

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

warning() public méthode

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
Résultat null