xref: /netbsd/external/bsd/ntp/dist/lib/isc/win32/syslog.h (revision 9034ec65)
1*9034ec65Schristos /*	$NetBSD: syslog.h,v 1.6 2020/05/25 20:47:23 christos Exp $	*/
2abb0f93cSkardel 
3abb0f93cSkardel /*
4abb0f93cSkardel  * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
5abb0f93cSkardel  * Copyright (C) 2001, 2002  Internet Software Consortium.
6abb0f93cSkardel  *
7abb0f93cSkardel  * Permission to use, copy, modify, and/or distribute this software for any
8abb0f93cSkardel  * purpose with or without fee is hereby granted, provided that the above
9abb0f93cSkardel  * copyright notice and this permission notice appear in all copies.
10abb0f93cSkardel  *
11abb0f93cSkardel  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12abb0f93cSkardel  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13abb0f93cSkardel  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14abb0f93cSkardel  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15abb0f93cSkardel  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16abb0f93cSkardel  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17abb0f93cSkardel  * PERFORMANCE OF THIS SOFTWARE.
18abb0f93cSkardel  */
19abb0f93cSkardel 
20*9034ec65Schristos /* Id: syslog.h,v 1.7 2007/06/19 23:47:19 tbox Exp  */
21abb0f93cSkardel 
22abb0f93cSkardel #ifndef _SYSLOG_H
23abb0f93cSkardel #define _SYSLOG_H
24abb0f93cSkardel 
25abb0f93cSkardel #include <stdio.h>
26abb0f93cSkardel 
27abb0f93cSkardel /* Constant definitions for openlog() */
28abb0f93cSkardel #define LOG_PID		1
29abb0f93cSkardel #define LOG_CONS	2
30abb0f93cSkardel /* NT event log does not support facility level */
31abb0f93cSkardel #define LOG_KERN	0
32abb0f93cSkardel #define LOG_USER	0
33abb0f93cSkardel #define LOG_MAIL	0
34abb0f93cSkardel #define LOG_DAEMON	0
35abb0f93cSkardel #define LOG_AUTH	0
36abb0f93cSkardel #define LOG_SYSLOG	0
37abb0f93cSkardel #define LOG_LPR		0
38abb0f93cSkardel #define LOG_LOCAL0	0
39abb0f93cSkardel #define LOG_LOCAL1	0
40abb0f93cSkardel #define LOG_LOCAL2	0
41abb0f93cSkardel #define LOG_LOCAL3	0
42abb0f93cSkardel #define LOG_LOCAL4	0
43abb0f93cSkardel #define LOG_LOCAL5	0
44abb0f93cSkardel #define LOG_LOCAL6	0
45abb0f93cSkardel #define LOG_LOCAL7	0
46abb0f93cSkardel 
47abb0f93cSkardel #define LOG_EMERG       0       /* system is unusable */
48abb0f93cSkardel #define LOG_ALERT       1       /* action must be taken immediately */
49abb0f93cSkardel #define LOG_CRIT        2       /* critical conditions */
50abb0f93cSkardel #define LOG_ERR         3       /* error conditions */
51abb0f93cSkardel #define LOG_WARNING     4       /* warning conditions */
52abb0f93cSkardel #define LOG_NOTICE      5       /* normal but signification condition */
53abb0f93cSkardel #define LOG_INFO        6       /* informational */
54abb0f93cSkardel #define LOG_DEBUG       7       /* debug-level messages */
55abb0f93cSkardel 
56abb0f93cSkardel void
57abb0f93cSkardel syslog(int level, const char *fmt, ...);
58abb0f93cSkardel 
59abb0f93cSkardel void
60abb0f93cSkardel openlog(const char *, int, ...);
61abb0f93cSkardel 
62abb0f93cSkardel void
63abb0f93cSkardel closelog(void);
64abb0f93cSkardel 
65abb0f93cSkardel void
66abb0f93cSkardel ModifyLogLevel(int level);
67abb0f93cSkardel 
68abb0f93cSkardel void
69abb0f93cSkardel InitNTLogging(FILE *, int);
70abb0f93cSkardel 
71abb0f93cSkardel void
72abb0f93cSkardel NTReportError(const char *, const char *);
73abb0f93cSkardel /*
74abb0f93cSkardel  * Include the event codes required for logging.
75abb0f93cSkardel  */
76abb0f93cSkardel #include <isc/bindevt.h>
77abb0f93cSkardel 
78abb0f93cSkardel #endif
79