Added LWM2M runtime log level to the logging module

This commit is contained in:
Niclas Finne 2017-12-01 02:36:17 +01:00
parent 4c56184a9b
commit 49d38e6d06
5 changed files with 10 additions and 0 deletions

View File

@ -46,6 +46,7 @@
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_DBG
#define LOG_CONF_LEVEL_FRAMER LOG_LEVEL_DBG
#define LOG_CONF_LEVEL_COAP LOG_LEVEL_DBG
#define LOG_CONF_LEVEL_LWM2M LOG_LEVEL_DBG
#define LOG_CONF_LEVEL_6TOP LOG_LEVEL_DBG
/* Enable cooja annotations */

View File

@ -137,6 +137,10 @@
#define LOG_CONF_LEVEL_COAP LOG_LEVEL_NONE
#endif /* LOG_CONF_LEVEL_COAP */
#ifndef LOG_CONF_LEVEL_LWM2M
#define LOG_CONF_LEVEL_LWM2M LOG_LEVEL_NONE
#endif /* LOG_CONF_LEVEL_LWM2M */
#ifndef LOG_CONF_LEVEL_MAIN
#define LOG_CONF_LEVEL_MAIN LOG_LEVEL_INFO
#endif /* LOG_CONF_LEVEL_MAIN */

View File

@ -60,6 +60,7 @@ int curr_log_level_mac = LOG_CONF_LEVEL_MAC;
int curr_log_level_framer = LOG_CONF_LEVEL_FRAMER;
int curr_log_level_6top = LOG_CONF_LEVEL_6TOP;
int curr_log_level_coap = LOG_CONF_LEVEL_COAP;
int curr_log_level_lwm2m = LOG_CONF_LEVEL_LWM2M;
int curr_log_level_main = LOG_CONF_LEVEL_MAIN;
struct log_module all_modules[] = {
@ -72,6 +73,7 @@ struct log_module all_modules[] = {
{"framer", &curr_log_level_framer, LOG_CONF_LEVEL_FRAMER},
{"6top", &curr_log_level_6top, LOG_CONF_LEVEL_6TOP},
{"coap", &curr_log_level_coap, LOG_CONF_LEVEL_COAP},
{"lwm2m", &curr_log_level_lwm2m, LOG_CONF_LEVEL_LWM2M},
{"main", &curr_log_level_main, LOG_CONF_LEVEL_MAIN},
{NULL, NULL, 0},
};

View File

@ -82,6 +82,7 @@ extern int curr_log_level_mac;
extern int curr_log_level_framer;
extern int curr_log_level_6top;
extern int curr_log_level_coap;
extern int curr_log_level_lwm2m;
extern int curr_log_level_main;
extern struct log_module all_modules[];
@ -95,6 +96,7 @@ extern struct log_module all_modules[];
#define LOG_LEVEL_FRAMER MIN((LOG_CONF_LEVEL_FRAMER), curr_log_level_framer)
#define LOG_LEVEL_6TOP MIN((LOG_CONF_LEVEL_6TOP), curr_log_level_6top)
#define LOG_LEVEL_COAP MIN((LOG_CONF_LEVEL_COAP), curr_log_level_coap)
#define LOG_LEVEL_LWM2M MIN((LOG_CONF_LEVEL_LWM2M), curr_log_level_lwm2m)
#define LOG_LEVEL_MAIN MIN((LOG_CONF_LEVEL_MAIN), curr_log_level_main)
/* Main log function */

View File

@ -151,4 +151,5 @@
##### "LOG_CONF_LEVEL_FRAMER": _________________ == LOG_CONF_LEVEL_FRAMER
##### "LOG_CONF_LEVEL_6TOP": ___________________ == LOG_CONF_LEVEL_6TOP
##### "LOG_CONF_LEVEL_COAP": ___________________ == LOG_CONF_LEVEL_COAP
##### "LOG_CONF_LEVEL_LWM2M": __________________ == LOG_CONF_LEVEL_LWM2M
##### "LOG_CONF_LEVEL_MAIN": ___________________ == LOG_CONF_LEVEL_MAIN