Hi!
I'm trying to add logging modules to my own libraries that I've created. I'm using SDK 14.3 with the nrf52832. I can enable logging for any of the SDK driver/libraries or log anything from main. The output appears in the RTT viewer as expected.
When I try to register my own module I never see the logging output in RTT viewer.
I followed the infocenter logging documentation and added the following to my files.
#define NRF_LOG_MODULE_NAME mpu
#if MPU_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL MPU_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR MPU_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR MPU_CONFIG_DEBUG_COLOR
#else //MPU_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL 0
#endif //MPU_CONFIG_LOG_ENABLED
#include "nrf_log.h"
NRF_LOG_MODULE_REGISTER();
#if MPU_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL MPU_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR MPU_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR MPU_CONFIG_DEBUG_COLOR
#else //MPU_CONFIG_LOG_ENABLED
#define NRF_LOG_LEVEL 0
#endif //MPU_CONFIG_LOG_ENABLED
#include "nrf_log.h"
NRF_LOG_MODULE_REGISTER();
Then I added the appropriate defines to the sdk_config.h
Is there anything else I'm missing? What else do I need to do to register a logging module.