Closes the underlying socket.
Logs a message at Severity.debug.
A shortcut for log with severity: 'debug'.
The free-form message text.
Optionalopts: Omit<LogOptions, "message" | "severity">
Optional other fields, identical to LogOptions minus severity and message.
Resolves once the bytes are written.
Frames and sends an already-formatted line verbatim.
A complete syslog message; it is framed but not otherwise altered.
Resolves once the bytes are written.
Logs a message at Severity.error.
A shortcut for log with severity: 'error'.
The free-form message text.
Optionalopts: Omit<LogOptions, "message" | "severity">
Optional other fields, identical to LogOptions minus severity and message.
Resolves once the bytes are written.
Logs a message at Severity.info.
A shortcut for log with severity: 'info'. Any other field (facility, structured
data, overrides) can be passed in opts.
The free-form message text.
Optionalopts: Omit<LogOptions, "message" | "severity">
Optional other fields, identical to LogOptions minus severity and message.
Resolves once the bytes are written.
Formats a record as an RFC 5424 line, frames it, and writes it.
The record to send.
Resolves once the bytes are written to the transport.
Logs a message at Severity.notice.
A shortcut for log with severity: 'notice'.
The free-form message text.
Optionalopts: Omit<LogOptions, "message" | "severity">
Optional other fields, identical to LogOptions minus severity and message.
Resolves once the bytes are written.
Logs a message at Severity.warning.
A shortcut for log with severity: 'warning'.
The free-form message text.
Optionalopts: Omit<LogOptions, "message" | "severity">
Optional other fields, identical to LogOptions minus severity and message.
Resolves once the bytes are written.
A live syslog session that can send one or more records.
Obtain one with connect. It is an
AsyncDisposable, so it can be scoped withawait usingand closes the socket on disposal. Because syslog over TCP is one-way, no method ever reads a reply.Since
1.0.0
Example