bluetooth: Simplifying log macros
Function name prefix is now configurable (by default only debug messages are prefixed) and log macros can be simplified. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
0899a6c0b7
commit
dc2ab4d74f
1 changed files with 0 additions and 7 deletions
|
@ -36,16 +36,9 @@ extern "C" {
|
|||
|
||||
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||
|
||||
#if IS_ENABLED(CONFIG_LOG_FUNCTION_NAME)
|
||||
#define BT_DBG(fmt, ...) LOG_DBG(fmt, ##__VA_ARGS__)
|
||||
#define BT_ERR(fmt, ...) LOG_ERR(fmt, ##__VA_ARGS__)
|
||||
#define BT_WARN(fmt, ...) LOG_WRN(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define BT_DBG(fmt, ...) LOG_DBG("%s: " fmt, __func__, ##__VA_ARGS__)
|
||||
#define BT_ERR(fmt, ...) LOG_ERR("%s: " fmt, __func__, ##__VA_ARGS__)
|
||||
#define BT_WARN(fmt, ...) LOG_WRN("%s: " fmt, __func__, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#define BT_INFO(fmt, ...) LOG_INF(fmt, ##__VA_ARGS__)
|
||||
|
||||
#define BT_ASSERT(cond) if (!(cond)) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue