Foreign status objects for syslog and other logging frameworks
Lassi Kortela 05 Aug 2020 10:33 UTC
The syslog interface (simplified) is:
procedure openlog(ident: string, facility: enum)
procedure syslog(priority: enum, message: string)
facility enum:
LOG_AUTH
LOG_AUTHPRIV
LOG_CRON
LOG_DAEMON
LOG_FTP
LOG_KERN
LOG_LPR
LOG_MAIL
LOG_NEWS
LOG_SECURITY
LOG_SYSLOG
LOG_USER
LOG_UUCP
LOG_LOCAL0
priority enum:
LOG_EMERG
LOG_ALERT
LOG_CRIT
LOG_ERR
LOG_WARNING
LOG_NOTICE
LOG_INFO
LOG_DEBUG
Should we use foreign-status objects to represent syslog messages?
(make-foreign-status
'facility 'news
'priority 'emerg
'message "Pants on fire")
This goes against the foreign-status principle of having a particular
status code, but otherwise it fits.