1290001Sglebius/* 2290001Sglebius * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") 3290001Sglebius * Copyright (C) 2001, 2002 Internet Software Consortium. 4290001Sglebius * 5290001Sglebius * Permission to use, copy, modify, and/or distribute this software for any 6290001Sglebius * purpose with or without fee is hereby granted, provided that the above 7290001Sglebius * copyright notice and this permission notice appear in all copies. 8290001Sglebius * 9290001Sglebius * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10290001Sglebius * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11290001Sglebius * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12290001Sglebius * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13290001Sglebius * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14290001Sglebius * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15290001Sglebius * PERFORMANCE OF THIS SOFTWARE. 16290001Sglebius */ 17290001Sglebius 18290001Sglebius/* $Id: syslog.h,v 1.7 2007/06/19 23:47:19 tbox Exp $ */ 19290001Sglebius 20290001Sglebius#ifndef _SYSLOG_H 21290001Sglebius#define _SYSLOG_H 22290001Sglebius 23290001Sglebius#include <stdio.h> 24290001Sglebius 25290001Sglebius/* Constant definitions for openlog() */ 26290001Sglebius#define LOG_PID 1 27290001Sglebius#define LOG_CONS 2 28290001Sglebius/* NT event log does not support facility level */ 29290001Sglebius#define LOG_KERN 0 30290001Sglebius#define LOG_USER 0 31290001Sglebius#define LOG_MAIL 0 32290001Sglebius#define LOG_DAEMON 0 33290001Sglebius#define LOG_AUTH 0 34290001Sglebius#define LOG_SYSLOG 0 35290001Sglebius#define LOG_LPR 0 36290001Sglebius#define LOG_LOCAL0 0 37290001Sglebius#define LOG_LOCAL1 0 38290001Sglebius#define LOG_LOCAL2 0 39290001Sglebius#define LOG_LOCAL3 0 40290001Sglebius#define LOG_LOCAL4 0 41290001Sglebius#define LOG_LOCAL5 0 42290001Sglebius#define LOG_LOCAL6 0 43290001Sglebius#define LOG_LOCAL7 0 44290001Sglebius 45290001Sglebius#define LOG_EMERG 0 /* system is unusable */ 46290001Sglebius#define LOG_ALERT 1 /* action must be taken immediately */ 47290001Sglebius#define LOG_CRIT 2 /* critical conditions */ 48290001Sglebius#define LOG_ERR 3 /* error conditions */ 49290001Sglebius#define LOG_WARNING 4 /* warning conditions */ 50290001Sglebius#define LOG_NOTICE 5 /* normal but signification condition */ 51290001Sglebius#define LOG_INFO 6 /* informational */ 52290001Sglebius#define LOG_DEBUG 7 /* debug-level messages */ 53290001Sglebius 54290001Sglebiusvoid 55290001Sglebiussyslog(int level, const char *fmt, ...); 56290001Sglebius 57290001Sglebiusvoid 58290001Sglebiusopenlog(const char *, int, ...); 59290001Sglebius 60290001Sglebiusvoid 61290001Sglebiuscloselog(void); 62290001Sglebius 63290001Sglebiusvoid 64290001SglebiusModifyLogLevel(int level); 65290001Sglebius 66290001Sglebiusvoid 67290001SglebiusInitNTLogging(FILE *, int); 68290001Sglebius 69290001Sglebiusvoid 70290001SglebiusNTReportError(const char *, const char *); 71290001Sglebius/* 72290001Sglebius * Include the event codes required for logging. 73290001Sglebius */ 74290001Sglebius#include <isc/bindevt.h> 75290001Sglebius 76290001Sglebius#endif 77