PHP Класс Monolog\Logger

It contains a stack of Handlers and a stack of Processors, and uses them to store records that are added to it.
Автор: Jordi Boggiano ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$handlers The handler stack
$levels
$name
$processors

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный метод

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

addAlert() публичный метод

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
Результат boolean Whether the record has been processed

addCritical() публичный метод

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
Результат boolean Whether the record has been processed

addDebug() публичный метод

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
Результат boolean Whether the record has been processed

addError() публичный метод

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
Результат boolean Whether the record has been processed

addInfo() публичный метод

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
Результат boolean Whether the record has been processed

addRecord() публичный метод

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
Результат boolean Whether the record has been processed

addWarning() публичный метод

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
Результат boolean Whether the record has been processed

alert() публичный метод

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
Результат boolean Whether the record has been processed

crit() публичный метод

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
Результат boolean Whether the record has been processed

debug() публичный метод

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
Результат boolean Whether the record has been processed

emerg() публичный метод

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
Результат boolean Whether the record has been processed

err() публичный метод

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
Результат boolean Whether the record has been processed

getLevelName() публичный статический метод

Gets the name of the logging level.
public static getLevelName ( integer $level ) : string
$level integer
Результат string

info() публичный метод

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
Результат boolean Whether the record has been processed

notice() публичный метод

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
Результат boolean Whether the record has been processed

popHandler() публичный метод

Pops an handler from the stack
public popHandler ( ) : Monolog\Handler\HandlerInterface
Результат Monolog\Handler\HandlerInterface

popProcessor() публичный метод

Removes the processor on top of the stack and returns it.
public popProcessor ( ) : callable
Результат callable

pushHandler() публичный метод

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

pushProcessor() публичный метод

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

warn() публичный метод

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
Результат boolean Whether the record has been processed

Описание свойств

$handlers защищенное свойство

The handler stack
protected $handlers

$levels защищенное статическое свойство

protected static $levels

$name защищенное свойство

protected $name

$processors защищенное свойство

protected $processors