diff --git a/mbed_lib.json b/mbed_lib.json index 1fddbd2cbac6..ce65c8a038a9 100644 --- a/mbed_lib.json +++ b/mbed_lib.json @@ -5,6 +5,10 @@ "configuration": { "help": "Build time configuration. Refer to Handbook for valid values. Default: full stack", "value": "nanostack_full" + }, + "trace_max_level": { + "help": "One of mbed-trace level defines: TRACE_LEVEL_DEBUG, TRACE_LEVEL_INFO, TRACE_LEVEL_WARN or TRACE_LEVEL_ERROR", + "value": null } }, "macros": ["NS_USE_EXTERNAL_MBED_TLS"], diff --git a/source/nsconfig.h b/source/nsconfig.h index dff8a5622d48..dfb182a5affb 100644 --- a/source/nsconfig.h +++ b/source/nsconfig.h @@ -54,6 +54,13 @@ #endif #endif /* HAVE_WS */ +/* Configure trace level for Nanostack */ +#ifdef MBED_CONF_NANOSTACK_TRACE_MAX_LEVEL +#ifdef MBED_TRACE_MAX_LEVEL +#undef MBED_TRACE_MAX_LEVEL +#endif /* MBED_TRACE_MAX_LEVEL */ +#define MBED_TRACE_MAX_LEVEL MBED_CONF_NANOSTACK_TRACE_MAX_LEVEL +#endif /* MBED_CONF_NANOSTACK_TRACE_MAX_LEVEL */ #endif // ifndef _NANOSTACK_SOURCE_CONFIG_H