logging: Kconfig cleanup of frontened related options

Cleanup in kconfig options in preparation for adding a
frontend that will use dictionary mode.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2022-03-29 15:47:01 +02:00 committed by Marti Bolivar
parent 8f919e41fa
commit 33923014b9
7 changed files with 16 additions and 5 deletions

View file

@ -1700,7 +1700,7 @@ list(APPEND
${extra_post_build_byproducts}
)
if(CONFIG_LOG_DICTIONARY_SUPPORT)
if(CONFIG_LOG_DICTIONARY_DB)
set(log_dict_db_output --json=${PROJECT_BINARY_DIR}/log_dictionary.json)
elseif(CONFIG_LOG_MIPI_SYST_USE_CATALOG)
set(log_dict_db_output --syst=${PROJECT_BINARY_DIR}/mipi_syst_collateral.xml)

View file

@ -95,6 +95,11 @@ if(NOT CONFIG_LOG_MODE_MINIMAL)
log_backend_spinel.c
)
zephyr_sources_ifdef(
CONFIG_LOG_FRONTEND_DICT_UART
log_frontend_dict_uart.c
)
if(CONFIG_LOG_DICTIONARY_SUPPORT)
zephyr_sources(log_output_dict.c)
endif()

View file

@ -14,12 +14,12 @@ rsource "Kconfig.mode"
rsource "Kconfig.filtering"
rsource "Kconfig.processing"
if !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL
rsource "Kconfig.formatting"
rsource "Kconfig.processing"
rsource "Kconfig.backends"
endif # !LOG_FRONTEND_ONLY && !LOG_MODE_MINIMAL

View file

@ -47,6 +47,7 @@ config LOG_MIPI_SYST_CATALOG_ARGS_BUFFER_SIZE
config LOG_DICTIONARY_SUPPORT
bool
depends on LOG2
select LOG_DICTIONARY_DB
help
Enable support for dictionary based logging.

View file

@ -65,6 +65,9 @@ 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 LOG_DICTIONARY_DB
bool
config LOG2_MSG_PKG_ALWAYS_ADD_RO_STRING_IDXS
bool
help

View file

@ -3,6 +3,7 @@
choice LOG_MODE
prompt "Mode"
depends on !LOG_FRONTEND_ONLY
default LOG_MODE_MINIMAL if LOG_DEFAULT_MINIMAL
default LOG_MODE_IMMEDIATE if LOG2_MODE_IMMEDIATE
default LOG_MODE_DEFERRED

View file

@ -14,11 +14,12 @@ config LOG_PRINTK_MAX_STRING_LENGTH
int "Maximum string length supported by LOG_PRINTK"
depends on LOG_PRINTK
depends on (!LOG_MODE_IMMEDIATE || USERSPACE)
depends on LOG1
default 128
help
Array is allocated on the stack.
if !LOG_MODE_IMMEDIATE
if LOG_MODE_DEFERRED && !LOG_FRONTEND_ONLY
config LOG_MODE_OVERFLOW
bool "Drop oldest message when full"
@ -106,7 +107,7 @@ config LOG_BUFFER_SIZE
help
Number of bytes dedicated for the logger internal buffer.
endif # !LOG_MODE_IMMEDIATE
endif # LOG_MODE_DEFERRED && !LOG_FRONTEND_ONLY
if LOG1_DEFERRED