]>
Commit | Line | Data |
---|---|---|
832b75ed GG |
1 | /* |
2 | * os_win32/syslog.h | |
3 | * | |
4 | * Home page of code is: http://smartmontools.sourceforge.net | |
5 | * | |
34ad0c5f | 6 | * Copyright (C) 2004-8 Christian Franke <smartmontools-support@lists.sourceforge.net> |
832b75ed GG |
7 | * |
8 | * This program is free software; you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation; either version 2, or (at your option) | |
11 | * any later version. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
ee38a438 GI |
14 | * (for example COPYING); if not, write to the Free Software Foundation, |
15 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
832b75ed GG |
16 | * |
17 | */ | |
18 | ||
19 | #ifndef SYSLOG_H | |
20 | #define SYSLOG_H | |
21 | ||
ee38a438 | 22 | #define SYSLOG_H_CVSID "$Id: syslog.h 3728 2012-12-13 17:57:50Z chrfranke $\n" |
832b75ed GG |
23 | |
24 | #include <stdarg.h> | |
25 | ||
4d59bff9 GG |
26 | #ifdef __cplusplus |
27 | extern "C" { | |
28 | #endif | |
29 | ||
832b75ed GG |
30 | /* EVENTLOG_ERROR_TYPE: */ |
31 | #define LOG_EMERG 0 | |
32 | #define LOG_ALERT 1 | |
33 | #define LOG_CRIT 2 | |
34 | #define LOG_ERR 3 | |
35 | /* EVENTLOG_WARNING_TYPE: */ | |
36 | #define LOG_WARNING 4 | |
37 | /* EVENTLOG_INFORMATION_TYPE: */ | |
38 | #define LOG_NOTICE 5 | |
39 | #define LOG_INFO 6 | |
40 | #define LOG_DEBUG 7 | |
41 | ||
42 | /* event log: */ | |
43 | #define LOG_DAEMON ( 3<<3) | |
44 | /* ident.log: */ | |
45 | #define LOG_LOCAL0 (16<<3) | |
46 | /* ident1-7.log: */ | |
47 | #define LOG_LOCAL1 (17<<3) | |
48 | #define LOG_LOCAL2 (18<<3) | |
49 | #define LOG_LOCAL3 (19<<3) | |
50 | #define LOG_LOCAL4 (20<<3) | |
51 | #define LOG_LOCAL5 (21<<3) | |
52 | #define LOG_LOCAL6 (22<<3) | |
53 | #define LOG_LOCAL7 (23<<3) | |
54 | ||
55 | #define LOG_FACMASK 0x03f8 | |
56 | #define LOG_FAC(f) (((f) & LOG_FACMASK) >> 3) | |
57 | ||
58 | #define LOG_PID 0x01 | |
59 | ||
60 | void openlog(const char * ident, int option, int facility); | |
61 | ||
62 | void closelog(void); | |
63 | ||
64 | void vsyslog(int priority, const char * message, va_list args); | |
65 | ||
4d59bff9 GG |
66 | #ifdef __cplusplus |
67 | } | |
68 | #endif | |
69 | ||
832b75ed | 70 | #endif /* SYSLOG_H */ |