1 /* 2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 3 * 4 * SPDX-License-Identifier: MPL-2.0 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 9 * 10 * See the COPYRIGHT file distributed with this work for additional 11 * information regarding copyright ownership. 12 */ 13 14 #ifndef _SYSLOG_H 15 #define _SYSLOG_H 16 17 #include <stdio.h> 18 19 /* Constant definitions for openlog() */ 20 #define LOG_PID 1 21 #define LOG_CONS 2 22 /* NT event log does not support facility level */ 23 #define LOG_KERN 0 24 #define LOG_USER 0 25 #define LOG_MAIL 0 26 #define LOG_DAEMON 0 27 #define LOG_AUTH 0 28 #define LOG_SYSLOG 0 29 #define LOG_LPR 0 30 #define LOG_LOCAL0 0 31 #define LOG_LOCAL1 0 32 #define LOG_LOCAL2 0 33 #define LOG_LOCAL3 0 34 #define LOG_LOCAL4 0 35 #define LOG_LOCAL5 0 36 #define LOG_LOCAL6 0 37 #define LOG_LOCAL7 0 38 39 #define LOG_EMERG 0 /* system is unusable */ 40 #define LOG_ALERT 1 /* action must be taken immediately */ 41 #define LOG_CRIT 2 /* critical conditions */ 42 #define LOG_ERR 3 /* error conditions */ 43 #define LOG_WARNING 4 /* warning conditions */ 44 #define LOG_NOTICE 5 /* normal but signification condition */ 45 #define LOG_INFO 6 /* informational */ 46 #define LOG_DEBUG 7 /* debug-level messages */ 47 48 void 49 syslog(int level, const char *fmt, ...); 50 51 void 52 openlog(const char *, int, ...); 53 54 void 55 closelog(void); 56 57 void 58 ModifyLogLevel(int level); 59 60 void 61 InitNTLogging(FILE *, int); 62 63 void 64 NTReportError(const char *, const char *); 65 /* 66 * Include the event codes required for logging. 67 */ 68 #include <isc/bindevt.h> 69 70 #endif /* ifndef _SYSLOG_H */ 71