app_log_module.ii
1 #pragma once 2 3 #define NRF_LOG_MODULE_NAME odiin 4 #if ODIIN_LOG_ENABLED 5 #define NRF_LOG_LEVEL ODIIN_LOG_LEVEL 6 #define NRF_LOG_INFO_COLOR ODIIN_INFO_COLOR 7 #define NRF_LOG_DEBUG_COLOR ODIIN_DEBUG_COLOR 8 #else //ODIIN_LOG_ENABLED 9 #define NRF_LOG_LEVEL 0 10 #endif //ODIIN_LOG_ENABLED 11 #include "nrf_log.h" 12 13 #if defined(ODIIN_VERBOSE_LOGGING) && (ODIIN_VERBOSE_LOGGING == 1) 14 #define NRF_LOG_VERBOSE(...) NRF_LOG_DEBUG(__VA_ARGS__) 15 #define NRF_HEXDUMP_VERBOSE(p_data, len) NRF_LOG_HEXDUMP_DEBUG(p_data, len) 16 #else 17 #define NRF_LOG_VERBOSE(...) 18 #define NRF_HEXDUMP_VERBOSE(p_data, len) do { UNUSED_VARIABLE(p_data); UNUSED_VARIABLE(len); } while(0) 19 #endif // ODIIN_VERBOSE_LOGGING 20 21 #define LOG_STATE_ENTER(state) NRF_LOG_INFO("[State] => Enter: %s", #state) 22 #define LOG_STATE_EXIT(state) NRF_LOG_INFO("[State] Exit: %s =>", #state)