Skip to content

Commit 63f2843

Browse files
committed
LOG: Add BT_LOGV to print verbose log.
bug: v/78468 Signed-off-by: YuhengLi <[email protected]>
1 parent 91aa677 commit 63f2843

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ config BLUETOOTH_SERVICE_LOG_LEVEL
825825
default 7
826826
depends on BLUETOOTH_SERVICE
827827
help
828-
Set BT Service log level <0~7>
828+
Set BT Service log level <0~8>
829829
endif #BLUETOOTH_LOG
830830

831831
endmenu #Debug

service/utils/log.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ enum bt_log_level_ {
4242
BT_LOG_LEVEL_WARNING = LOG_WARNING,
4343
BT_LOG_LEVEL_INFO = LOG_INFO,
4444
BT_LOG_LEVEL_DEBUG = LOG_DEBUG,
45+
BT_LOG_LEVEL_VERBOSE = LOG_DEBUG + 1,
4546
};
4647

4748
#ifndef CONFIG_BLUETOOTH_SERVICE_LOG_LEVEL
@@ -51,6 +52,7 @@ enum bt_log_level_ {
5152
#define BT_LOGW(fmt, args...)
5253
#define BT_LOGI(fmt, args...)
5354
#define BT_LOGD(fmt, args...)
55+
#define BT_LOGV(fmt, args...)
5456
#else
5557
extern bool bt_log_print_check(uint8_t level);
5658

@@ -81,6 +83,11 @@ extern bool bt_log_print_check(uint8_t level);
8183
if (bt_log_print_check(BT_LOG_LEVEL_DEBUG)) \
8284
BT_LOG(LOG_ID_FRAMEWORK, BT_LOG_LEVEL_DEBUG, fmt, ##__VA_ARGS__); \
8385
} while (0);
86+
#define BT_LOGV(fmt, ...) \
87+
do { \
88+
if (bt_log_print_check(BT_LOG_LEVEL_VERBOSE)) \
89+
BT_LOG(LOG_ID_FRAMEWORK, BT_LOG_LEVEL_DEBUG, fmt, ##__VA_ARGS__); \
90+
} while (0);
8491
#endif
8592

8693
#define BT_ADDR_LOG(fmt, _addr, ...) \

0 commit comments

Comments
 (0)