PHP Class Monolog\Logger

It contains a stack of Handlers and a stack of Processors, and uses them to store records that are added to it.
Author: Jordi Boggiano ([email protected])
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Свойство Type Description
$handlers The handler stack
$levels
$name
$processors

Méthodes publiques

Méthode Description
__construct ( string $name )
addAlert ( string $message, array $context = [] ) : boolean Adds a log record at the ALERT level.
addCritical ( string $message, array $context = [] ) : boolean Adds a log record at the CRITICAL level.
addDebug ( string $message, array $context = [] ) : boolean Adds a log record at the DEBUG level.
addError ( string $message, array $context = [] ) : boolean Adds a log record at the ERROR level.
addInfo ( string $message, array $context = [] ) : boolean Adds a log record at the INFO level.
addRecord ( integer $level, string $message, array $context = [] ) : boolean Adds a log record.
addWarning ( string $message, array $context = [] ) : boolean Adds a log record at the WARNING level.
alert ( string $message, array $context = [] ) : boolean Adds a log record at the ALERT level.
crit ( string $message, array $context = [] ) : boolean Adds a log record at the CRITICAL level.
debug ( string $message, array $context = [] ) : boolean Adds a log record at the DEBUG level.
emerg ( string $message, array $context = [] ) : boolean Adds a log record at the ALERT level.
err ( string $message, array $context = [] ) : boolean Adds a log record at the ERROR level.
getLevelName ( integer $level ) : string Gets the name of the logging level.
info ( string $message, array $context = [] ) : boolean Adds a log record at the INFO level.
notice ( string $message, array $context = [] ) : boolean Adds a log record at the INFO level.
popHandler ( ) : Monolog\Handler\HandlerInterface Pops an handler from the stack
popProcessor ( ) : callable Removes the processor on top of the stack and returns it.
pushHandler ( Monolog\Handler\HandlerInterface $handler ) Pushes an handler on the stack.
pushProcessor ( callable $callback ) Adds a processor in the stack.
warn ( string $message, array $context = [] ) : boolean Adds a log record at the WARNING level.

Method Details

__construct() public méthode

public __construct ( string $name )
$name string The logging channel

addAlert() public méthode

Adds a log record at the ALERT level.
public addAlert ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

addCritical() public méthode

Adds a log record at the CRITICAL level.
public addCritical ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

addDebug() public méthode

Adds a log record at the DEBUG level.
public addDebug ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

addError() public méthode

Adds a log record at the ERROR level.
public addError ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

addInfo() public méthode

Adds a log record at the INFO level.
public addInfo ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

addRecord() public méthode

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

addWarning() public méthode

Adds a log record at the WARNING level.
public addWarning ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

alert() public méthode

This method allows to have an easy ZF compatibility.
public alert ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

crit() public méthode

This method allows to have an easy ZF compatibility.
public crit ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

debug() public méthode

This method allows to have an easy ZF compatibility.
public debug ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

emerg() public méthode

This method allows to have an easy ZF compatibility.
public emerg ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

err() public méthode

This method allows to have an easy ZF compatibility.
public err ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

getLevelName() public static méthode

Gets the name of the logging level.
public static getLevelName ( integer $level ) : string
$level integer
Résultat string

info() public méthode

This method allows to have an easy ZF compatibility.
public info ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

notice() public méthode

This method allows to have an easy ZF compatibility.
public notice ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

popHandler() public méthode

Pops an handler from the stack
public popHandler ( ) : Monolog\Handler\HandlerInterface
Résultat Monolog\Handler\HandlerInterface

popProcessor() public méthode

Removes the processor on top of the stack and returns it.
public popProcessor ( ) : callable
Résultat callable

pushHandler() public méthode

Pushes an handler on the stack.
public pushHandler ( Monolog\Handler\HandlerInterface $handler )
$handler Monolog\Handler\HandlerInterface

pushProcessor() public méthode

Adds a processor in the stack.
public pushProcessor ( callable $callback )
$callback callable

warn() public méthode

This method allows to have an easy ZF compatibility.
public warn ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
Résultat boolean Whether the record has been processed

Property Details

$handlers protected_oe property

The handler stack
protected $handlers

$levels protected_oe static_oe property

protected static $levels

$name protected_oe property

protected $name

$processors protected_oe property

protected $processors