Documentation

LoggerInterfaceHandler
in package
implements LogHandler

Tags
author

Ralf Lang lang@b1-systems.de

category

Horde

license

http://www.horde.org/licenses/bsd BSD

subpackage

Handlers

Interfaces, Classes, Traits and Enums

LogHandler
interface of a Log Handler.

Table of Contents

$filters  : array<string|int, mixed>
List of filters relevant only to this handler.
$formatters  : array<string|int, mixed>
Formatters for this handler.
$logger  : LoggerInterface
__construct()  : mixed
Constructor.
addFilter()  : void
Add a filter specific to this handler.
log()  : void
Log a message to this handler.
setOption()  : bool
Sets an option specific to the implementation of the log handler.
write()  : bool
Buffer a message to be stored in the storage.

Properties

$filters

List of filters relevant only to this handler.

protected array<string|int, mixed> $filters = []

Methods

__construct()

Constructor.

public __construct(LoggerInterface $logger[, array<string|int, LogFilter$filters = [] ][, array<string|int, LogFormatter$formatters = [] ]) : mixed
Parameters
$logger : LoggerInterface

The PSR-3 Logger to wrap

$filters : array<string|int, LogFilter> = []

Any filters to run before logging

$formatters : array<string|int, LogFormatter> = []

Any formatters to run before logging

Return values
mixed

addFilter()

Add a filter specific to this handler.

public addFilter(LogFilter $filter) : void

Handlers cannot undo the filtering at logger level

Parameters
$filter : LogFilter

Filter to add.

Return values
void

log()

Log a message to this handler.

public log(LogMessage $event) : void

Check all filters and expand it before delegating to the write method

Parameters
$event : LogMessage

Log event.

Return values
void

setOption()

Sets an option specific to the implementation of the log handler.

public setOption(string $optionKey, mixed $optionValue) : bool
Parameters
$optionKey : string

Key name for the option to be changed. Keys are handler-specific.

$optionValue : mixed

New value to assign to the option

Tags
throws
LogException
Return values
bool

True.

Search results