Common syslog functionality.
More...
|
| __construct ($facility=LOG_USER, $level=Logger::DEBUG, $bubble=true) |
|
Public Member Functions inherited from Monolog\Handler\AbstractProcessingHandler |
| handle (array $record) |
| {Handles a record.All records may be passed to this method, and the handler should discard those that it does not want to handle.The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.- Parameters
-
array | $record | The record to handle |
- Returns
- bool true means that this handler handled the record, and that bubbling is not permitted. false means the record was either not processed or that this handler allows bubbling.
} More...
|
|
Public Member Functions inherited from Monolog\Handler\AbstractHandler |
| __construct ($level=Logger::DEBUG, $bubble=true) |
|
| isHandling (array $record) |
| {Checks whether the given record will be handled by this handler.This is mostly done for performance reasons, to avoid calling processors for nothing.Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.- Parameters
-
array | $record | Partial log record containing only a level key |
- Returns
- bool
} More...
|
|
| handleBatch (array $records) |
| {Handles a set of records at once.- Parameters
-
array | $records | The records to handle (an array of record arrays) |
} More...
|
|
| close () |
| Closes the handler. More...
|
|
| pushProcessor ($callback) |
| {Adds a processor in the stack.- Parameters
-
- Returns
- self
} More...
|
|
| popProcessor () |
| {Removes the processor on top of the stack and returns it.- Returns
- callable
} More...
|
|
| setFormatter (FormatterInterface $formatter) |
| {Sets the formatter.- Parameters
-
FormatterInterface | $formatter | |
- Returns
- self
} More...
|
|
| getFormatter () |
| {Gets the formatter.- Returns
- FormatterInterface
} More...
|
|
| setLevel ($level) |
| Sets minimum logging level at which this handler will be triggered. More...
|
|
| getLevel () |
| Gets minimum logging level at which this handler will be triggered. More...
|
|
| setBubble ($bubble) |
| Sets the bubbling behavior. More...
|
|
| getBubble () |
| Gets the bubbling behavior. More...
|
|
| __destruct () |
|
| reset () |
|
Common syslog functionality.
Definition at line 20 of file AbstractSyslogHandler.php.
◆ __construct()
Monolog\Handler\AbstractSyslogHandler::__construct |
( |
|
$facility = LOG_USER , |
|
|
|
$level = Logger::DEBUG , |
|
|
|
$bubble = true |
|
) |
| |
- Parameters
-
mixed | $facility | |
int | $level | The minimum logging level at which this handler will be triggered |
bool | $bubble | Whether the messages that are handled can bubble up the stack or not |
Definition at line 60 of file AbstractSyslogHandler.php.
References Monolog\Handler\AbstractHandler\$bubble, Monolog\Handler\AbstractSyslogHandler\$facility, and Monolog\Handler\AbstractHandler\$level.
64 if (!defined(
'PHP_WINDOWS_VERSION_BUILD')) {
65 $this->facilities[
'local0'] = LOG_LOCAL0;
66 $this->facilities[
'local1'] = LOG_LOCAL1;
67 $this->facilities[
'local2'] = LOG_LOCAL2;
68 $this->facilities[
'local3'] = LOG_LOCAL3;
69 $this->facilities[
'local4'] = LOG_LOCAL4;
70 $this->facilities[
'local5'] = LOG_LOCAL5;
71 $this->facilities[
'local6'] = LOG_LOCAL6;
72 $this->facilities[
'local7'] = LOG_LOCAL7;
74 $this->facilities[
'local0'] = 128;
75 $this->facilities[
'local1'] = 136;
76 $this->facilities[
'local2'] = 144;
77 $this->facilities[
'local3'] = 152;
78 $this->facilities[
'local4'] = 160;
79 $this->facilities[
'local5'] = 168;
80 $this->facilities[
'local6'] = 176;
81 $this->facilities[
'local7'] = 184;
85 if (array_key_exists(strtolower(
$facility), $this->facilities)) {
87 } elseif (!in_array(
$facility, array_values($this->facilities),
true)) {
88 throw new \UnexpectedValueException(
'Unknown facility value "'.
$facility.
'" given');
◆ getDefaultFormatter()
Monolog\Handler\AbstractSyslogHandler::getDefaultFormatter |
( |
| ) |
|
|
protected |
{}
Definition at line 97 of file AbstractSyslogHandler.php.
99 return new LineFormatter(
'%channel%.%level_name%: %message% %context% %extra%');
◆ $facilities
Monolog\Handler\AbstractSyslogHandler::$facilities |
|
protected |
Initial value:= array(
'auth' => LOG_AUTH,
'authpriv' => LOG_AUTHPRIV,
'cron' => LOG_CRON,
'daemon' => LOG_DAEMON,
'kern' => LOG_KERN,
'lpr' => LOG_LPR,
'mail' => LOG_MAIL,
'news' => LOG_NEWS,
'syslog' => LOG_SYSLOG,
'user' => LOG_USER,
'uucp' => LOG_UUCP,
)
List of valid log facility names.
Definition at line 41 of file AbstractSyslogHandler.php.
◆ $facility
Monolog\Handler\AbstractSyslogHandler::$facility |
|
protected |
◆ $logLevels
Monolog\Handler\AbstractSyslogHandler::$logLevels |
|
protected |
The documentation for this class was generated from the following file: