summaryrefslogtreecommitdiff
path: root/include/syslog.h
blob: f61e33b5678fdfe4458956c362f4c1cf83a95fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Public domain
 * syslog.h compatibility shim
 */

#ifndef LIBCRYPTOCOMPAT_SYSLOG_H
#define LIBCRYPTOCOMPAT_SYSLOG_H

#ifndef _WIN32
#include_next <syslog.h>
#else

/* priorities */
#define LOG_EMERG 0
#define LOG_ALERT 1
#define LOG_CRIT 2
#define LOG_ERR 3
#define LOG_WARNING 4
#define LOG_NOTICE 5
#define LOG_INFO 6
#define LOG_DEBUG 7

/* facility codes */
#define LOG_KERN (0<<3)
#define LOG_USER (1<<3)
#define LOG_DAEMON (3<<3)

/* flags for openlog */
#define LOG_PID 0x01
#define LOG_CONS 0x02

extern void openlog(const char *ident, int option, int facility);
extern void syslog(int priority, const char *fmt, ...)
	__attribute__ ((__format__ (__printf__, 2, 3)));
extern void closelog (void);
#endif

#endif /* LIBCRYPTOCOMPAT_SYSLOG_H */