PHP Класс Neos\Flow\Log\Logger

Наследование: implements SystemLoggerInterface, implements Neos\Flow\Log\ThrowableLoggerInterface, implements SecurityLoggerInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$backends SplObjectStorage

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

Метод Описание
__construct ( ) Constructs the logger
addBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void Adds the backend to which the logger sends the logging data
log ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null ) : void Writes the given message along with the additional information into the log.
logException ( Exception $exception, array $additionalData = [] ) : void
logThrowable ( Throwable $throwable, array $additionalData = [] ) : void
removeBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void Runs the close() method of a backend and removes the backend from the logger.
setBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void Sets the given backend as the only backend for this Logger.
shutdownObject ( ) : void Cleanly closes all registered backends before destructing this Logger

Защищенные методы

Метод Описание
getErrorLogMessage ( object $error ) : string
logError ( object $error, array $additionalData = [] ) : void Writes information about the given exception into the log.
renderBacktrace ( string $message, array $backTrace ) : string Renders background information about the circumstances of the exception.
renderErrorInfo ( object $error ) : string Get current error post mortem informations with support for error chaining
renderRequestInfo ( ) : string Render information about the current request, if possible

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

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

Constructs the logger
public __construct ( )

addBackend() публичный Метод

Adds the backend to which the logger sends the logging data
public addBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void
$backend Neos\Flow\Log\Backend\BackendInterface A backend implementation
Результат void

getErrorLogMessage() защищенный Метод

protected getErrorLogMessage ( object $error ) : string
$error object \Exception or \Throwable
Результат string

log() публичный Метод

Writes the given message along with the additional information into the log.
public log ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null ) : void
$message string The message to log
$severity integer An integer value, one of the LOG_* constants
$additionalData mixed A variable containing more information about the event to be logged
$packageKey string Key of the package triggering the log (determined automatically if not specified)
$className string Name of the class triggering the log (determined automatically if not specified)
$methodName string Name of the method triggering the log (determined automatically if not specified)
Результат void

logError() защищенный Метод

Writes information about the given exception into the log.
protected logError ( object $error, array $additionalData = [] ) : void
$error object \Exception or \Throwable
$additionalData array Additional data to log
Результат void

logException() публичный Метод

public logException ( Exception $exception, array $additionalData = [] ) : void
$exception Exception The exception to log
$additionalData array Additional data to log
Результат void

logThrowable() публичный Метод

public logThrowable ( Throwable $throwable, array $additionalData = [] ) : void
$throwable Throwable The throwable to log
$additionalData array Additional data to log
Результат void

removeBackend() публичный Метод

Runs the close() method of a backend and removes the backend from the logger.
public removeBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void
$backend Neos\Flow\Log\Backend\BackendInterface The backend to remove
Результат void

renderBacktrace() защищенный Метод

Renders background information about the circumstances of the exception.
protected renderBacktrace ( string $message, array $backTrace ) : string
$message string
$backTrace array
Результат string

renderErrorInfo() защищенный Метод

Get current error post mortem informations with support for error chaining
protected renderErrorInfo ( object $error ) : string
$error object \Exception or \Throwable
Результат string

renderRequestInfo() защищенный Метод

Render information about the current request, if possible
protected renderRequestInfo ( ) : string
Результат string

setBackend() публичный Метод

This method allows for conveniently injecting a backend through some Objects.yaml configuration.
public setBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void
$backend Neos\Flow\Log\Backend\BackendInterface A backend implementation
Результат void

shutdownObject() публичный Метод

Cleanly closes all registered backends before destructing this Logger
public shutdownObject ( ) : void
Результат void

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

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

protected SplObjectStorage $backends
Результат SplObjectStorage