libscipaper 1.0.x
sci-log.h
Go to the documentation of this file.
1
17#pragma once
18
19#include <syslog.h> /* LOG_DAEMON, LOG_USER */
20
21#include "types.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#define SCI_LOG_SYSLOG 1
28#define SCI_LOG_STDERR 0
42#define sci_module_log(loglevel, fmt, ...) sci_log(loglevel, "%s: " fmt, MODULE_NAME, ##__VA_ARGS__)
43
46void sci_log(const loglevel_t loglevel, const char *const fmt, ...)
47 __attribute__((format(printf, 2, 3)));
48void sci_log_open(const char *const name, const int facility, const int type);
49void sci_log_close(void);
50
51#ifdef __cplusplus
52}
53#endif
54
loglevel_t
Severity of loglevels.
Definition types.h:37