PHP Интерфейс Neos\Flow\Log\LoggerInterface

The severities are (according to RFC3164) the PHP constants: LOG_EMERG # Emergency: system is unusable LOG_ALERT # Alert: action must be taken immediately LOG_CRIT # Critical: critical conditions LOG_ERR # Error: error conditions LOG_WARNING # Warning: warning conditions LOG_NOTICE # Notice: normal but significant condition LOG_INFO # Informational: informational messages LOG_DEBUG # Debug: debug-level messages
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
addBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void Adds a 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 Writes information about the given exception into the log.
removeBackend ( Neos\Flow\Log\Backend\BackendInterface $backend ) : void Runs the close() method of a backend and removes the backend from the logger.

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

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

Adds a 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

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

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

Writes information about the given exception into the log.
public logException ( Exception $exception, array $additionalData = [] ) : void
$exception Exception The exception 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