|
|
1.1 ! root 1: /* --------------------------------------------------- */ ! 2: /* | Copyright (c) 1986 MIPS Computer Systems, Inc. | */ ! 3: /* | All Rights Reserved. | */ ! 4: /* --------------------------------------------------- */ ! 5: /* $Header: syslog.h,v 1.6 89/01/19 13:47:23 purves Exp $ */ ! 6: /* ! 7: * Copyright (c) 1982, 1986, 1988 Regents of the University of California. ! 8: * All rights reserved. ! 9: * ! 10: * Redistribution and use in source and binary forms are permitted ! 11: * provided that the above copyright notice and this paragraph are ! 12: * duplicated in all such forms and that any documentation, ! 13: * advertising materials, and other materials related to such ! 14: * distribution and use acknowledge that the software was developed ! 15: * by the University of California, Berkeley. The name of the ! 16: * University may not be used to endorse or promote products derived ! 17: * from this software without specific prior written permission. ! 18: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 19: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 20: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 21: * ! 22: * @(#)syslog.h 7.10 (Berkeley) 6/27/88 ! 23: */ ! 24: ! 25: #ifndef _BSD_SYSLOG_ ! 26: #define _BSD_SYSLOG_ 1 ! 27: ! 28: /* ! 29: * Facility codes ! 30: */ ! 31: ! 32: #define LOG_KERN (0<<3) /* kernel messages */ ! 33: #define LOG_USER (1<<3) /* random user-level messages */ ! 34: #define LOG_MAIL (2<<3) /* mail system */ ! 35: #define LOG_DAEMON (3<<3) /* system daemons */ ! 36: #define LOG_AUTH (4<<3) /* security/authorization messages */ ! 37: #define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ ! 38: #define LOG_LPR (6<<3) /* line printer subsystem */ ! 39: #define LOG_NEWS (7<<3) /* network news subsystem */ ! 40: #define LOG_UUCP (8<<3) /* UUCP subsystem */ ! 41: /* other codes through 15 reserved for system use */ ! 42: #define LOG_LOCAL0 (16<<3) /* reserved for local use */ ! 43: #define LOG_LOCAL1 (17<<3) /* reserved for local use */ ! 44: #define LOG_LOCAL2 (18<<3) /* reserved for local use */ ! 45: #define LOG_LOCAL3 (19<<3) /* reserved for local use */ ! 46: #define LOG_LOCAL4 (20<<3) /* reserved for local use */ ! 47: #define LOG_LOCAL5 (21<<3) /* reserved for local use */ ! 48: #define LOG_LOCAL6 (22<<3) /* reserved for local use */ ! 49: #define LOG_LOCAL7 (23<<3) /* reserved for local use */ ! 50: ! 51: #define LOG_NFACILITIES 24 /* maximum number of facilities */ ! 52: #define LOG_FACMASK 0x03f8 /* mask to extract facility part */ ! 53: ! 54: #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) /* facility of pri */ ! 55: ! 56: /* ! 57: * Priorities (these are ordered) ! 58: */ ! 59: ! 60: #define LOG_EMERG 0 /* system is unusable */ ! 61: #define LOG_ALERT 1 /* action must be taken immediately */ ! 62: #define LOG_CRIT 2 /* critical conditions */ ! 63: #define LOG_ERR 3 /* error conditions */ ! 64: #define LOG_WARNING 4 /* warning conditions */ ! 65: #define LOG_NOTICE 5 /* normal but signification condition */ ! 66: #define LOG_INFO 6 /* informational */ ! 67: #define LOG_DEBUG 7 /* debug-level messages */ ! 68: ! 69: #define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ ! 70: #define LOG_PRI(p) ((p) & LOG_PRIMASK) /* extract priority */ ! 71: ! 72: #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) ! 73: ! 74: #ifdef KERNEL ! 75: #define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */ ! 76: #endif ! 77: ! 78: /* ! 79: * arguments to setlogmask. ! 80: */ ! 81: #define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ ! 82: #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ ! 83: ! 84: /* ! 85: * Option flags for openlog. ! 86: * ! 87: * LOG_ODELAY no longer does anything; LOG_NDELAY is the ! 88: * inverse of what it used to be. ! 89: */ ! 90: #define LOG_PID 0x01 /* log the pid with each message */ ! 91: #define LOG_CONS 0x02 /* log on the console if errors in sending */ ! 92: #define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ ! 93: #define LOG_NDELAY 0x08 /* don't delay open */ ! 94: #define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ ! 95: ! 96: #endif _BSD_SYSLOG_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.