Documentation

Horde_Log_Handler_Syslog extends Horde_Log_Handler_Base
in package

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

$_filters  : array<string|int, mixed>
List of filter objects.
$_lastFacility  : string
Last facility name set by a syslog-handler instance.
$_lastIdent  : string
Last ident set by a syslog-handler instance.
$_options  : array<string|int, mixed>
Options to be set by setOption().
$_priorities  : array<string|int, mixed>
Map of log levels to syslog priorities.
addFilter()  : mixed
Add a filter specific to this handler.
log()  : mixed
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 log.
_initializeSyslog()  : mixed
Initialize syslog / set ident and facility.
_toSyslog()  : int
Translate a log level to a syslog LOG_* priority.

Properties

$_filters

List of filter objects.

protected array<string|int, mixed> $_filters = array()

$_lastFacility

Last facility name set by a syslog-handler instance.

protected string $_lastFacility

$_lastIdent

Last ident set by a syslog-handler instance.

protected string $_lastIdent

$_options

Options to be set by setOption().

protected array<string|int, mixed> $_options = array('defaultPriority' => \LOG_ERR, 'facility' => \LOG_USER, 'ident' => \false, 'openlogOptions' => \false)

Sets openlog and syslog options.

$_priorities

Map of log levels to syslog priorities.

protected array<string|int, mixed> $_priorities = array(\Horde_Log::EMERG => \LOG_EMERG, \Horde_Log::ALERT => \LOG_ALERT, \Horde_Log::CRIT => \LOG_CRIT, \Horde_Log::ERR => \LOG_ERR, \Horde_Log::WARN => \LOG_WARNING, \Horde_Log::NOTICE => \LOG_NOTICE, \Horde_Log::INFO => \LOG_INFO, \Horde_Log::DEBUG => \LOG_DEBUG)

Methods

log()

Log a message to this handler.

public log(array<string|int, mixed> $event) : mixed
Parameters
$event : array<string|int, mixed>

Log event.

Return values
mixed

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
Horde_Log_Exception
Return values
bool

True.

write()

Write a message to the log.

public write(array<string|int, mixed> $event) : bool
Parameters
$event : array<string|int, mixed>

Log event.

Tags
throws
Horde_Log_Exception
Return values
bool

True.

_initializeSyslog()

Initialize syslog / set ident and facility.

protected _initializeSyslog() : mixed
Tags
throws
Horde_Log_Exception
Return values
mixed

_toSyslog()

Translate a log level to a syslog LOG_* priority.

protected _toSyslog(int $level) : int
Parameters
$level : int

Log level.

Return values
int

A LOG_* constant.

Search results