Sends a single log record in one call: connect, log once, close.
A convenience wrapper over connect + SyslogSession.log for the fire-once case. The session is always closed, even if logging throws.
Connection options merged with the record fields.
Resolves once the message is written and the socket is closed.
If the socket cannot be opened.
If the record cannot be formatted.
1.0.0
import { send } from 'edgeport/syslog';await send({ hostname: 'logs.example.com', appName: 'cron', severity: 'notice', message: 'nightly job complete'}); Copy
import { send } from 'edgeport/syslog';await send({ hostname: 'logs.example.com', appName: 'cron', severity: 'notice', message: 'nightly job complete'});
Sends a single log record in one call: connect, log once, close.
A convenience wrapper over connect + SyslogSession.log for the fire-once case. The session is always closed, even if logging throws.