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
| #ifndef __BT_LOG__
| #define __BT_LOG__
| #include <syslog.h>
|
| #ifdef __cplusplus
| extern "C" {
| #endif
|
| #define LOG_TAG "BLUEZ_LOG"
| #define SYSLOG_DEBUG
|
| #ifdef SYSLOG_DEBUG
| #define pr_debug(fmt, ...) syslog(LOG_DEBUG, fmt, ##__VA_ARGS__)
| #define pr_info(fmt, ...) syslog(LOG_INFO, fmt, ##__VA_ARGS__)
| #define pr_warning(fmt, ...) syslog(LOG_WARNING, fmt, ##__VA_ARGS__)
| #define pr_err(fmt, ...) syslog(LOG_ERR, fmt, ##__VA_ARGS__)
| #else
| #define pr_debug printf
| #define pr_info printf
| #define pr_warning printf
| #define pr_err printf
| #endif
|
| #ifdef __cplusplus
| }
| #endif
|
| #endif
|
|