[go: up one dir, main page]

File: syslog.h

package info (click to toggle)
smartmontools 7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,740 kB
  • sloc: cpp: 49,345; ansic: 9,924; sh: 6,043; makefile: 962
file content (62 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download | duplicates (6)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * os_win32/syslog.h
 *
 * Home page of code is: http://www.smartmontools.org
 *
 * Copyright (C) 2004-8 Christian Franke
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef SYSLOG_H
#define SYSLOG_H

#define SYSLOG_H_CVSID "$Id: syslog.h 4760 2018-08-19 18:45:53Z chrfranke $\n"

#include <stdarg.h>

#ifdef __cplusplus
extern "C" {
#endif

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

/* event log: */
#define LOG_DAEMON      ( 3<<3)
/* ident.log: */
#define LOG_LOCAL0      (16<<3)
/* ident1-7.log: */
#define LOG_LOCAL1      (17<<3)
#define LOG_LOCAL2      (18<<3)
#define LOG_LOCAL3      (19<<3)
#define LOG_LOCAL4      (20<<3)
#define LOG_LOCAL5      (21<<3)
#define LOG_LOCAL6      (22<<3)
#define LOG_LOCAL7      (23<<3)

#define LOG_FACMASK     0x03f8
#define LOG_FAC(f)      (((f) & LOG_FACMASK) >> 3)
 
#define LOG_PID         0x01

void openlog(const char * ident, int option, int facility);

void closelog(void);

void vsyslog(int priority, const char * message, va_list args);

#ifdef __cplusplus
}
#endif

#endif /* SYSLOG_H */