Constants

VERSION

VERSION

Properties

$_levels

$_levels : array

Log levels where the keys are the level priorities and the values are the level names.

Type

array

$_handlers

$_handlers : array

Horde_Log_Handler_Base objects.

Type

array

$_filters

$_filters : array

Horde_Log_Filter objects.

Type

array

Methods

__construct()

__construct(\Horde_Log_Handler_Base|null  $handler = null) 

Constructor.

Parameters

\Horde_Log_Handler_Base|null $handler

Default handler.

serialize()

serialize() : string

Serialize.

Returns

string —

Serialized representation of this object.

unserialize()

unserialize(string  $data) 

Unserialize.

Parameters

string $data

Serialized data.

Throws

\Exception

__call()

__call(string  $method, string  $params) 

Undefined method handler allows a shortcut: <pre> $log->levelName('message'); instead of $log->log('message', Horde_Log_LEVELNAME); </pre>

Parameters

string $method

Log level name.

string $params

Message to log.

log()

log(mixed  $event, integer  $level = null) 

Log a message at a level

Parameters

mixed $event

Message to log, either an array or a string.

integer $level

Log level of message, required if $message is a string.

hasLevel()

hasLevel(string  $name) : boolean

Does this logger have the level $name already?

Parameters

string $name

The level name to check for.

Returns

boolean —

Whether the logger already has the specific level name.

addLevel()

addLevel(string  $name, integer  $level) 

Add a custom log level

Parameters

string $name

Name of level.

integer $level

Numeric level.

addFilter()

addFilter(\Horde_Log_Filter  $filter) 

Add a filter that will be applied before all log handlers.

Before a message will be received by any of the handlers, it must be accepted by all filters added with this method.

Parameters

\Horde_Log_Filter $filter

Filter to add.

addHandler()

addHandler(\Horde_Log_Handler_Base  $handler) 

Add a handler. A handler is responsible for taking a log message and writing it out to storage.

Parameters

\Horde_Log_Handler_Base $handler

Handler to add.

LOGLEVEL()

LOGLEVEL(mixed  $event) : void

Log an event at LOGLEVEL, where LOGLEVEL has been added with addLevel() or already exists

Parameters

mixed $event

emerg()

emerg(mixed  $event) : void

Log an event at the EMERG log level

Parameters

mixed $event

alert()

alert(mixed  $event) : void

Log an event at the ALERT log level

Parameters

mixed $event

crit()

crit(mixed  $event) : void

Log an event at the CRIT log level

Parameters

mixed $event

err()

err(mixed  $event) : void

Log an event at the ERR log level

Parameters

mixed $event

warn()

warn(mixed  $event) : void

Log an event at the WARN log level

Parameters

mixed $event

notice()

notice(mixed  $event) : void

Log an event at the NOTICE log level

Parameters

mixed $event

info()

info(mixed  $event) : void

Log an event at the INFO log level

Parameters

mixed $event

debug()

debug(mixed  $event) : void

Log an event at the DEBUG log level

Parameters

mixed $event

_init()

_init() 

Initialization tasks.