BLE-Gamepad-Client 0.3.2
Loading...
Searching...
No Matches
logger.h
1#pragma once
2
3#include "config.h"
4
5#if CONFIG_BT_BLEGC_LOG_LEVEL >= 5
6#define BLEGC_LOGT(tag, format, ...) CONFIG_BT_BLEGC_LOGGER("T %s: " format "\n", ##__VA_ARGS__)
7#else
8#define BLEGC_LOGT(tag, format, ...) (void)0
9#endif
10
11#if CONFIG_BT_BLEGC_LOG_LEVEL >= 4
12#define BLEGC_LOGD(tag, format, ...) CONFIG_BT_BLEGC_LOGGER("D %s: " format "\n", tag, ##__VA_ARGS__)
13#else
14#define BLEGC_LOGD(tag, format, ...) (void)0
15#endif
16
17#if CONFIG_BT_BLEGC_LOG_LEVEL >= 3
18#define BLEGC_LOGI(tag, format, ...) CONFIG_BT_BLEGC_LOGGER("I %s: " format "\n", tag, ##__VA_ARGS__)
19#else
20#define BLEGC_LOGI(tag, format, ...) (void)0
21#endif
22
23#if CONFIG_BT_BLEGC_LOG_LEVEL >= 2
24#define BLEGC_LOGW(tag, format, ...) CONFIG_BT_BLEGC_LOGGER("W %s: " format "\n", tag, ##__VA_ARGS__)
25#else
26#define BLEGC_LOGW(tag, format, ...) (void)0
27#endif
28
29#if CONFIG_BT_BLEGC_LOG_LEVEL >= 1
30#define BLEGC_LOGE(tag, format, ...) CONFIG_BT_BLEGC_LOGGER("E %s: " format "\n", tag, ##__VA_ARGS__)
31#else
32#define BLEGC_LOGE(tag, format, ...) (void)0
33#endif