PHP Класс Neos\Flow\Log\Backend\FileBackend

Наследование: extends AbstractBackend
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$createParentDirectories boolean
$fileHandle resource
$logFileUrl string
$logFilesToKeep integer
$logMessageOrigin boolean
$maximumLogFileSize integer
$severityLabels array An array of severity labels, indexed by their integer constant

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

Метод Описание
append ( string $message, integer $severity = LOG_INFO, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null ) : void Appends the given message along with the additional information into the log.
close ( ) : void Carries out all actions necessary to cleanly close the logging backend, such as closing the log file or disconnecting from a database.
open ( ) : void Carries out all actions necessary to prepare the logging backend, such as opening the log file or opening a database connection.
setCreateParentDirectories ( boolean $flag ) : void Sets the flag telling if parent directories in the path leading to the log file URL should be created if they don't exist.
setLogFileURL ( string $logFileUrl ) : void Sets URL pointing to the log file. Usually the full directory and the filename, however any valid stream URL is possible.
setLogFilesToKeep ( integer $logFilesToKeep ) : void If a new log file is started, keep this number of old log files.
setLogMessageOrigin ( boolean $flag ) : void If enabled, a hint about where the log message was created is added to the log file.
setMaximumLogFileSize ( integer $maximumLogFileSize ) : void Sets the maximum log file size, if the logfile is bigger, a new one is started.

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

Метод Описание
rotateLogFile ( ) : void Rotate the log file and make sure the configured number of files is kept.

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

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

Appends the given message along with the additional information into the log.
public append ( 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 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

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

Note: for this backend we do nothing here and rely on PHP to close the filehandle when the request ends. This is to allow full logging until request end.
public close ( ) : void
Результат void

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

Carries out all actions necessary to prepare the logging backend, such as opening the log file or opening a database connection.
public open ( ) : void
Результат void

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

Rotate the log file and make sure the configured number of files is kept.
protected rotateLogFile ( ) : void
Результат void

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

The default is to not create parent directories automatically.
public setCreateParentDirectories ( boolean $flag ) : void
$flag boolean TRUE if parent directories should be created
Результат void

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

Sets URL pointing to the log file. Usually the full directory and the filename, however any valid stream URL is possible.
public setLogFileURL ( string $logFileUrl ) : void
$logFileUrl string URL pointing to the log file
Результат void

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

If a new log file is started, keep this number of old log files.
См. также: setMaximumLogFileSize()
public setLogFilesToKeep ( integer $logFilesToKeep ) : void
$logFilesToKeep integer Number of old log files to keep
Результат void

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

If enabled, a hint about where the log message was created is added to the log file.
public setLogMessageOrigin ( boolean $flag ) : void
$flag boolean
Результат void

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

Sets the maximum log file size, if the logfile is bigger, a new one is started.
См. также: setLogFilesToKeep()
public setMaximumLogFileSize ( integer $maximumLogFileSize ) : void
$maximumLogFileSize integer Maximum size in bytes
Результат void

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

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

protected bool $createParentDirectories
Результат boolean

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

protected resource $fileHandle
Результат resource

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

protected string $logFileUrl
Результат string

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

protected int $logFilesToKeep
Результат integer

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

protected bool $logMessageOrigin
Результат boolean

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

protected int $maximumLogFileSize
Результат integer

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

An array of severity labels, indexed by their integer constant
protected array $severityLabels
Результат array