Syslog adapter.
Constructor.
| Type | Description |
|---|---|
| array | Configuration |
NULL
public function __construct(array $config)
{
openlog($config['identifier'], LOG_CONS, $config['facility']);
}
Destructor
NULL
public function __destruct()
{
closelog();
}
Writes message to log.
| Type | Description |
|---|---|
| string | The message to write to the log |
| int | (optional) Message type |
boolean TRUE on success or FALSE on failure.
public function write($message, $type = Log::ERROR)
{
return syslog($this->types[$type], $message);
}