| SYSLOG(3lua) | LUA Library Manual | SYSLOG(3lua) |
syslog — access
syslog(3) functionality from
Lua
local syslog = require 'syslog'
The syslog Lua binding provides access to
the syslog(3)
functionality.
syslog.openlog(ident,
logopt, facility)syslog.LOG_CONSsyslog.syslog()
cannot pass the message to syslogd(8) it will attempt to write the
message to the console (``/dev/console'').
syslog.LOG_NDELAYsyslog.LOG_PERRORsyslog.LOG_PIDThe facility parameter encodes a default facility to be assigned to all messages that do not have an explicit facility encoded:
syslog.LOG_AUTHsyslog.LOG_AUTHPRIVsyslog.LOG_CRONsyslog.LOG_DAEMONsyslog.LOG_FTPsyslog.LOG_KERNsyslog.LOG_LPRsyslog.LOG_MAILsyslog.LOG_NEWSsyslog.LOG_SYSLOGsyslog.LOG_USERsyslog.LOG_UUCPsyslog.LOG_LOCAL0syslog.syslog(priority,
message)syslog()
function writes message to the system message
logger. The message is then written to the system console, log files,
logged-in users, or forwarded to other machines as appropriate (see
syslogd(8)).
The message is tagged with priority. Priorities are encoded as a facility and a level. The facility describes the part of the system generating the message. The level is selected from the following ordered (high to low) list:
syslog.LOG_EMERGsyslog.LOG_ALERTsyslog.LOG_CRITsyslog.LOG_ERRsyslog.LOG_WARNINGsyslog.LOG_NOTICEsyslog.LOG_INFOsyslog.LOG_DEBUGsyslog.closelog()syslog.closelog()
function can be used to close the log file.
oldmask
= syslog.setlogmask(maskpri)setlogmask()
function sets the log priority mask to maskpri and returns the previous
mask. Calls to syslog() with a priority not set in
maskpri are rejected.A syslog Lua binding manual appeared in
NetBSD 7.0.
The syslog Lua binding was written by
Marc Balmer
<mbalmer@NetBSD.org>.
| January 7, 2014 | NetBSD 11.0 |