Documentation

FirebugHandler extends BaseHandler
in package
Uses SetOptionsTrait

Tags
author

Mike Naberezny mike@maintainable.com

author

Chuck Hagenbuch chuck@horde.org

category

Horde

license

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

subpackage

Handlers

Table of Contents

$buffer  : array<string|int, array<string|int, mixed>>
Array of buffered output.
$filters  : array<string|int, LogFilter>
List of filters relevant only to this handler.
$formatters  : array<string|int, LogFormatter>
Formatters for this handler
$methods  : array<string|int, string>
Mapping of log priorities to Firebug methods.
$options  : FirebugOptions
__construct()  : mixed
Class Constructor
addFilter()  : void
Add a filter specific to this handler.
flush()  : bool
Flush the buffer.
log()  : void
Log a message to this handler.
setOption()  : bool
Sets an option specific to the implementation of the log handler.
write()  : bool
Write a message to the firebug console. This function really just writes the message to the buffer. If buffering is enabled, the message won't be output until the buffer is flushed. If buffering is not enabled, the buffer will be flushed immediately.

Properties

$buffer

Array of buffered output.

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

$filters

List of filters relevant only to this handler.

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

$methods

Mapping of log priorities to Firebug methods.

protected static array<string|int, string> $methods = [\Horde_Log::EMERG => 'error', \Horde_Log::ALERT => 'error', \Horde_Log::CRIT => 'error', \Horde_Log::ERR => 'error', \Horde_Log::WARN => 'warn', \Horde_Log::NOTICE => 'info', \Horde_Log::INFO => 'info', \Horde_Log::DEBUG => 'debug']

Methods

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

flush()

Flush the buffer.

public flush() : bool
Return values
bool

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.

write()

Write a message to the firebug console. This function really just writes the message to the buffer. If buffering is enabled, the message won't be output until the buffer is flushed. If buffering is not enabled, the buffer will be flushed immediately.

public write(LogMessage $event) : bool
Parameters
$event : LogMessage

Log event.

Return values
bool

True.

Search results