1.1.0 • Published 6 years ago
syslog-constants v1.1.0
About
This package contains the constants necessary for syslog related development.
Based on syslog.h. The keywords for reserved facility codes (11 to 15) were taken from RFC 3164 and Wikipedia.
Usage
Install using npm:
$ npm install syslog-constantsImport in your file:
const constants = require('syslog-constants');Properties
Properties are defined in four possible ways (if applicable):
- as a string, named the same as macros in syslog.h:
constants.severity.LOG_ERR=3 - as a string keyword:
constants.severity.err=3 - as a string keyword which was deprecated according to Wikipedia:
constants.severity.error=3 - as a number:
constants.severity[3]=LOG_ERR
Facility (constants.facility)
LOG_KERN=kernLOG_USER=userLOG_MAIL=mailLOG_DAEMON=daemonLOG_AUTH=authLOG_SYSLOG=syslogLOG_LPR=lprLOG_NEWS=newsLOG_UUCP=uucpLOG_CRON=cronLOG_AUTHPRIV=authprivLOG_FTP=ftpLOG_NTP=ntpLOG_SECURITY=securityLOG_CONSOLE=consoleLOG_CLOCK=clockLOG_LOCAL0=local0LOG_LOCAL1=local1LOG_LOCAL2=local2LOG_LOCAL3=local3LOG_LOCAL4=local4LOG_LOCAL5=local5LOG_LOCAL6=local6LOG_LOCAL7=local7
Severity (constants.severity)
LOG_EMERG=emerg( =panic)LOG_ALERT=alertLOG_CRIT=critLOG_ERR=err( =error)LOG_WARNING=warning( =warn)LOG_NOTICE=noticeLOG_INFO=infoLOG_DEBUG=debug
Flag (constants.flag)
LOG_PID=pidLOG_CONS=consLOG_ODELAY=odelayLOG_NDELAY=ndelayLOG_NOWAIT=nowaitLOG_PERROR=perror