UdpSyslogHandler implements ErrorHandler
FinalYes
Writes RFC 5424-style syslog frames over UDP to a remote collector.
The socket is opened lazily on the first handle() call, persisted across subsequent calls, and closed in __destruct().
Interfaces
- ErrorHandler
- Receives Throwables raised inside the SDK at runtime.
Methods
- __construct() : mixed
- __destruct() : mixed
- handle() : void
Methods
__construct()
public
__construct(string $host[, int $port = 514 ][, string $ident = 'flow-telemetry' ][, SyslogFacility $facility = SyslogFacility::User ][, SyslogSeverity $severity = SyslogSeverity::Error ]) : mixed
Parameters
- $host : string
- $port : int = 514
- $ident : string = 'flow-telemetry'
- $facility : SyslogFacility = SyslogFacility::User
- $severity : SyslogSeverity = SyslogSeverity::Error
__destruct()
public
__destruct() : mixed
handle()
public
handle(Throwable $error) : void
Parameters
- $error : Throwable