Skip to content

Commit

Permalink
Nanostak trace level configuration (ARMmbed#2489)
Browse files Browse the repository at this point in the history
Allow application to overwrite Nanostack trace level.
  • Loading branch information
Arto Kinnunen authored Nov 9, 2020
1 parent 6f52171 commit 42c9807
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
7 changes: 7 additions & 0 deletions source/nsconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 42c9807

Please sign in to comment.