final class SyslogLogger extends AbstractLogger (View source)

PSR-3 logger that writes every message to syslog under the configured identity and facility.

Constants

private PRIORITIES

Methods

__construct(string $ident = 'poweradmin', int $facility = LOG_USER)

No description

static string
levelFor(int $priority)

The PSR-3 level for a LOG_* priority, for sinks that still speak syslog priorities.

static LoggerInterface
fromConfig(ConfigurationInterface $config)

The syslog sink the logging.* settings ask for: a NullLogger when syslog_enabled is off, otherwise one opened with the configured identity and facility.

void
log($level, Stringable|string $message, array $context = [])

No description

__destruct()

No description

Details

__construct(string $ident = 'poweradmin', int $facility = LOG_USER)

No description

Parameters

string $ident
int $facility

static string levelFor(int $priority)

The PSR-3 level for a LOG_* priority, for sinks that still speak syslog priorities.

Parameters

int $priority

Return Value

string

static LoggerInterface fromConfig(ConfigurationInterface $config)

The syslog sink the logging.* settings ask for: a NullLogger when syslog_enabled is off, otherwise one opened with the configured identity and facility.

Parameters

ConfigurationInterface $config

Return Value

LoggerInterface

void log($level, Stringable|string $message, array $context = [])

No description

Parameters

$level
Stringable|string $message
array $context

Return Value

void

__destruct()

No description