SysLog
class SysLog implements LoggerInterface (View source)
Redirects logging messages to syslog.
Traits
A copy of \Psr\Log\LoggerTrait that uses RFC 5424 compliant log levels.
Properties
| protected Config | $config | A configuration object containing syslog settings. |
|
| protected LogMessageParserInterface | $parser | The message's placeholders parser. |
|
| protected bool | $connectionOpened | Stores whether there is a system logger connection opened or not. |
Methods
log($level, $message, array $context = [])
{@inheritdoc}
__construct(ConfigFactoryInterface $config_factory, LogMessageParserInterface $parser)
Constructs a SysLog object.
openConnection()
Opens a connection to the system logger.
syslogWrapper(int $level, string $entry)
A syslog wrapper to make syslog functionality testable.
Details
emergency($message, array $context = [])
{@inheritdoc}
alert($message, array $context = [])
{@inheritdoc}
critical($message, array $context = [])
{@inheritdoc}
error($message, array $context = [])
{@inheritdoc}
warning($message, array $context = [])
{@inheritdoc}
notice($message, array $context = [])
{@inheritdoc}
info($message, array $context = [])
{@inheritdoc}
debug($message, array $context = [])
{@inheritdoc}
log($level, $message, array $context = [])
{@inheritdoc}
__construct(ConfigFactoryInterface $config_factory, LogMessageParserInterface $parser)
Constructs a SysLog object.
protected
openConnection()
Opens a connection to the system logger.
protected
syslogWrapper(int $level, string $entry)
A syslog wrapper to make syslog functionality testable.