1: /* 2: * Copyright (c) 1982, 1986 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)syslog.h 7.1 (Berkeley) 6/4/86 7: */ 8: 9: /* 10: * Facility codes 11: */ 12: 13: #define LOG_KERN (0<<3) /* kernel messages */ 14: #define LOG_USER (1<<3) /* random user-level messages */ 15: #define LOG_MAIL (2<<3) /* mail system */ 16: #define LOG_DAEMON (3<<3) /* system daemons */ 17: #define LOG_AUTH (4<<3) /* security/authorization messages */ 18: #define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ 19: #define LOG_LPR (6<<3) /* line printer subsystem */ 20: /* other codes through 15 reserved for system use */ 21: #define LOG_LOCAL0 (16<<3) /* reserved for local use */ 22: #define LOG_LOCAL1 (17<<3) /* reserved for local use */ 23: #define LOG_LOCAL2 (18<<3) /* reserved for local use */ 24: #define LOG_LOCAL3 (19<<3) /* reserved for local use */ 25: #define LOG_LOCAL4 (20<<3) /* reserved for local use */ 26: #define LOG_LOCAL5 (21<<3) /* reserved for local use */ 27: #define LOG_LOCAL6 (22<<3) /* reserved for local use */ 28: #define LOG_LOCAL7 (23<<3) /* reserved for local use */ 29: 30: #define LOG_NFACILITIES 24 /* maximum number of facilities */ 31: #define LOG_FACMASK 0x03f8 /* mask to extract facility part */ 32: 33: /* 34: * Priorities (these are ordered) 35: */ 36: 37: #define LOG_EMERG 0 /* system is unusable */ 38: #define LOG_ALERT 1 /* action must be taken immediately */ 39: #define LOG_CRIT 2 /* critical conditions */ 40: #define LOG_ERR 3 /* error conditions */ 41: #define LOG_WARNING 4 /* warning conditions */ 42: #define LOG_NOTICE 5 /* normal but signification condition */ 43: #define LOG_INFO 6 /* informational */ 44: #define LOG_DEBUG 7 /* debug-level messages */ 45: 46: #define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ 47: 48: /* 49: * arguments to setlogmask. 50: */ 51: #define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ 52: #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ 53: 54: /* 55: * Option flags for openlog. 56: * 57: * LOG_ODELAY no longer does anything; LOG_NDELAY is the 58: * inverse of what it used to be. 59: */ 60: #define LOG_PID 0x01 /* log the pid with each message */ 61: #define LOG_CONS 0x02 /* log on the console if errors in sending */ 62: #define LOG_ODELAY 0x04 /* delay open until syslog() is called */ 63: #define LOG_NDELAY 0x08 /* don't delay open */ 64: #define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */