Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a way to disable the NRF_BLE_GQ Logger withouot disabling the whole Log?

I'm trying to disable the log for the module NRF_BLE_GQ, but it seems that the nrf_ble_gq.c doesn't have the piece of code that disable the log for that module,

in other modules there's a code like this

in ble_bas.c

#if BLE_BAS_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL BLE_BAS_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR BLE_BAS_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR BLE_BAS_CONFIG_DEBUG_COLOR
#else // BLE_BAS_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL 0
#endif // BLE_BAS_CONFIG_LOG_ENABLED

which allows to configure the Log for the module using the define BLE_BAS_CONFIG_LOG_ENABLED and BLE_BAS_CONFIG_*

I've tried adding: 

#define NRF_BLE_GQ_CONFIG_LOG_ENABLED 0 but since there's nothing on nrf_ble_gq.c like this code:

#if NRF_BLE_GQ_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL NRF_BLE_GQ_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR NRF_BLE_GQ_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR NRF_BLE_GQ_CONFIG_DEBUG_COLOR
#else // NRF_BLE_GQ_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL 0
#endif // NRF_BLE_GQ_CONFIG_LOG_ENABLED

Then the logger will be active by default for this module regardless of NRF_BLE_GQ_CONFIG_LOG_ENABLED definition

Is there a way to add this without having to add the code manually on the sdk files?

Thanks







 
#if NRF_BLE_GQ_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL BLE_BAS_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR BLE_BAS_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR BLE_BAS_CONFIG_DEBUG_COLOR
#else // BLE_BAS_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL 0
#endif // BLE_BAS_CONFIG_LOG_ENABLED
Related