syslog(3)’s line and its send, over Socket’s unix datagram door.
No daemon is needed to build a line: (Syslog line …) is pure but for the zone the time is shown in.
SyslogA line to the system log as syslog(3) sends it: (Syslog send ident facility severity text) builds it and sends it to the log daemon’s socket; (Syslog line …) builds it alone.
%facilitiesStatic field: data held by Syslog itself, not by its instances.
%severitiesStatic field: data held by Syslog itself, not by its instances.
%monthsStatic field: data held by Syslog itself, not by its instances.
(Syslog path)The log daemon’s socket on this system: /var/run/syslog on Darwin, /dev/log elsewhere.
Returns: STRING — A socket path
(Syslog priority facility severity)The PRI a line leads with: the facility’s number times eight plus the severity’s. Raises a label ‘value for a name it does not know.
Parameters:
SYMBOL — kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, local0 to local7SYMBOL — emerg, alert, crit, err, warning, notice, info, debugReturns: INTEGER — 0 to 191
(Syslog %two n pad)n in two characters.
Parameters:
INTEGER — 0 to 99STRING — The leading character under tenReturns: STRING — Two characters
(Syslog stamp secs)The time a line carries: local, as “Mmm dd hh:mm:ss” with the day space-padded, as the C libraries write it.
Parameters:
INTEGER — Seconds since the unix epochReturns: STRING — 15 characters
(Syslog line ident facility severity text secs pid)The line syslog(3) sends, without sending it: “
Parameters:
STRING — The program’s name, as openlog’s identSYMBOL — The facility, as priority takes itSYMBOL — The severity, as priority takes itSTRING — The messageINTEGER — The time, seconds since the unix epochINTEGER — The process id the line namesReturns: STRING — The line
(Syslog send ident facility severity text . where)Send one line to the log daemon, stamped now with this process’s id. Answers #t, or #f when no daemon is listening there – the caller decides what then.
Parameters:
STRING — The program’s name, as openlog’s identSYMBOL — The facility, as priority takes itSYMBOL — The severity, as priority takes itSTRING — The messageSTRING — The daemon’s socket; (Syslog path) when not givenReturns: BOOL — Whether the line was sent