Class LoggerAppenderSyslog
Log events to a system log using the PHP syslog() function.
This appenders requires a layout.
Configurable parameters:
- ident - The ident of the syslog message.
- priority - The priority for the syslog message (used when overriding priority).
- facility - The facility for the syslog message
- overridePriority - If set to true, the message priority
will always use the value defined in
LoggerAppenderSyslog::$priority
, otherwise the priority will be determined by the message's log level. - option - The option value for the syslog message.
Recognised syslog options are:
- CONS - if there is an error while sending data to the system logger, write directly to the system console
- NDELAY - open the connection to the logger immediately
- ODELAY - delay opening the connection until the first message is logged (default)
- PERROR - print log message also to standard error
- PID - include PID with each message
Multiple options can be set by delimiting them with a pipe character, e.g.: "CONS|PID|PERROR".
Recognised syslog priorities are:
- EMERG
- ALERT
- CRIT
- ERR
- WARNING
- NOTICE
- INFO
- DEBUG
Levels are mapped as follows:
- FATAL to LOG_ALERT
- ERROR to LOG_ERR
- WARN to LOG_WARNING
- INFO to LOG_INFO
- DEBUG to LOG_DEBUG
- TRACE to LOG_DEBUG
- LoggerConfigurable
- LoggerAppender
- LoggerAppenderSyslog
License: Apache License, Version 2.0
Version: $Revision: 1337820 $
Link: Appender documentation
Located at appenders/LoggerAppenderSyslog.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
|
|
public
|
|
public
|
setBoolean(),
setFileSize(),
setInteger(),
setLevel(),
setNumeric(),
setPositiveInteger(),
setString()
|
protected
string
|
$ident | "Apache log4php" |
#
The ident string is added to each message. Typically the name of your application. |
protected
string
|
$priority |
|
#
The syslog priority to use when overriding priority. This setting is required
if |
protected
string
|
$option | 'PID|CONS' |
#
The option used when opening the syslog connection. |
protected
string
|
$facility | 'USER' |
#
The facility value indicates the source of the message. |
protected
string
|
$overridePriority | false |
#
If set to true, the message priority will always use the value defined in
|
$closed,
$filter,
$layout,
$name,
$requiresLayout,
$threshold
|