This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 361b2f3045c49f906191426666a9e1e8870766c4 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Mon Aug 12 12:47:55 2024 +0200 sys/log: Add default log names There are several predefined modules that have assigned module id but are not generated by newt tool This adds string values that are used to get modlog module name for those predefined modules. Signed-off-by: Jerzy Kasenberg <[email protected]> --- sys/log/full/src/log.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/log/full/src/log.c b/sys/log/full/src/log.c index 68c04d6f0..4242e4c58 100644 --- a/sys/log/full/src/log.c +++ b/sys/log/full/src/log.c @@ -226,12 +226,27 @@ log_module_register(uint8_t id, const char *name) return id; } +static const char *const default_modules[] = { + "DEFAULT", + "OS", + "NEWTMGR", + "NIMBLE_CTLR", + "NIMBLE_HOST", + "NFFS", + "REBOOT", + "IOTIVITY", +}; + const char * log_module_get_name(uint8_t module) { int idx; const char *name; + if (module < LOG_MODULE_TEST) { + return default_modules[module]; + } + /* Find module defined in syscfg.logcfg sections */ name = logcfg_log_module_name(module);
