logging: v2: add kconfig to always add indexes to msg packages

This adds a new CONFIG_LOG2_MSG_PKG_ALWAYS_ADD_RO_STRING_IDXS
kconfig. If enabled, the log message packages will always have
the indexes of read-only string arguments appended to the package.
This will be selected only by those backends requiring it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2022-03-10 14:04:21 -08:00 committed by Carles Cufí
commit f7d3d0268e
2 changed files with 17 additions and 5 deletions

View file

@ -65,4 +65,11 @@ config LOG_MEM_UTILIZATION
When enabled, maximum usage of memory used for log messages in deferred
mode is tracked. It can be used to trim LOG_BUFFER_SIZE.
config LOG2_MSG_PKG_ALWAYS_ADD_RO_STRING_IDXS
bool
help
Enable this option to force log messages to always append indexes of
read-only string arguments in the package. This should be selected by
backends if required.
endmenu