1 /* 2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 3 * 4 * This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 * 8 * See the COPYRIGHT file distributed with this work for additional 9 * information regarding copyright ownership. 10 */ 11 12 #ifndef _SYSLOG_H 13 #define _SYSLOG_H 14 15 #include <stdio.h> 16 17 /* Constant definitions for openlog() */ 18 #define LOG_PID 1 19 #define LOG_CONS 2 20 /* NT event log does not support facility level */ 21 #define LOG_KERN 0 22 #define LOG_USER 0 23 #define LOG_MAIL 0 24 #define LOG_DAEMON 0 25 #define LOG_AUTH 0 26 #define LOG_SYSLOG 0 27 #define LOG_LPR 0 28 #define LOG_LOCAL0 0 29 #define LOG_LOCAL1 0 30 #define LOG_LOCAL2 0 31 #define LOG_LOCAL3 0 32 #define LOG_LOCAL4 0 33 #define LOG_LOCAL5 0 34 #define LOG_LOCAL6 0 35 #define LOG_LOCAL7 0 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 void 47 syslog(int level, const char *fmt, ...); 48 49 void 50 openlog(const char *, int, ...); 51 52 void 53 closelog(void); 54 55 void 56 ModifyLogLevel(int level); 57 58 void 59 InitNTLogging(FILE *, int); 60 61 void 62 NTReportError(const char *, const char *); 63 /* 64 * Include the event codes required for logging. 65 */ 66 #include <isc/bindevt.h> 67 68 #endif /* ifndef _SYSLOG_H */ 69