mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
components/bt: Improve the Bluetooth debug messaging scheme
As of now, when Bluetooth debugs are enabled, all the messages are mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor shows all logs in red color which might lead to missing the actual errors This patch maps the Bluetooth messages to appropriate ESP_LOG* messages and improves readability. Also, make the BT trace level be configurable in menuconfig, so that each layer of bt trace can be enabled/disabled. Finally, add debug log control for BTC, OSI, BLUFI and clear up Bluetooth debug logs. So, with this the method of enabling Bluetooth logs is as follows: 1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable -> BT DEBUG LOG LEVEL -> set trace level for every layer of BT Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
This commit is contained in:
committed by
island
parent
d4276efed7
commit
da6cb6c741
@@ -28,12 +28,12 @@ future_t *future_new(void)
|
||||
{
|
||||
future_t *ret = osi_calloc(sizeof(future_t));
|
||||
if (!ret) {
|
||||
LOG_ERROR("%s unable to allocate memory for return value.", __func__);
|
||||
OSI_TRACE_ERROR("%s unable to allocate memory for return value.", __func__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (osi_sem_new(&ret->semaphore, 1, 0) != 0) {
|
||||
LOG_ERROR("%s unable to allocate memory for the semaphore.", __func__);
|
||||
OSI_TRACE_ERROR("%s unable to allocate memory for the semaphore.", __func__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ future_t *future_new_immediate(void *value)
|
||||
{
|
||||
future_t *ret = osi_calloc(sizeof(future_t));
|
||||
if (!ret) {
|
||||
LOG_ERROR("%s unable to allocate memory for return value.", __func__);
|
||||
OSI_TRACE_ERROR("%s unable to allocate memory for return value.", __func__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user