MIPI Sys-T catalog messages are similar to dictionary logging where an ID is emitted instead of the format string. This allows the format strings to be removed from the final binary to save a few bytes. This adds the necessary bits to determine to emit catalog messages when appropriate. Note that this implementation copies the argument list as-is with string arguments stitched together since the format strings are assumed to have been removed and they cannot be examined to properly convert the argument lists into catalog message payloads. Because of this, various build asserts are there to avoid building for configurations where they are known not to work. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
118 lines
3.4 KiB
Plaintext
118 lines
3.4 KiB
Plaintext
# Copyright (c) 2021 Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menu "Output Formatting"
|
|
|
|
menu "Prepend non-hexdump log message with function name"
|
|
depends on !LOG_FRONTEND_ONLY
|
|
|
|
config LOG_FUNC_NAME_PREFIX_ERR
|
|
bool "Error messages prepended"
|
|
|
|
config LOG_FUNC_NAME_PREFIX_WRN
|
|
bool "Warning messages prepended"
|
|
|
|
config LOG_FUNC_NAME_PREFIX_INF
|
|
bool "Info messages prepended"
|
|
|
|
config LOG_FUNC_NAME_PREFIX_DBG
|
|
bool "Debug messages prepended"
|
|
default y
|
|
|
|
endmenu
|
|
|
|
config LOG_MIPI_SYST_ENABLE
|
|
bool "MIPI SyS-T format output"
|
|
select MIPI_SYST_LIB
|
|
help
|
|
Enable MIPI SyS-T format output for the logger system.
|
|
|
|
config LOG_MIPI_SYST_USE_CATALOG
|
|
bool "Use MIPI Sys-T Catalog for logging"
|
|
depends on LOG2 && LOG_MIPI_SYST_ENABLE
|
|
select LOG2_FMT_SECTION
|
|
select LOG2_MSG_PKG_ALWAYS_ADD_RO_STRING_IDXS
|
|
help
|
|
Use MIPI Sys-T Catalog for logging instead of plain text.
|
|
|
|
config LOG_MIPI_SYST_CATALOG_ARGS_BUFFER_SIZE
|
|
int "Size of temporary arguments buffer when using Sys-T Catalog"
|
|
depends on LOG_MIPI_SYST_USE_CATALOG
|
|
default 1024
|
|
help
|
|
The size (in bytes) of the temporary buffer to store the expanded
|
|
argument list needed for the MIPI Sys-T library for processing
|
|
catalog messages.
|
|
|
|
config LOG_DICTIONARY_SUPPORT
|
|
bool
|
|
depends on LOG2
|
|
help
|
|
Enable support for dictionary based logging.
|
|
|
|
Dictionary based logging is binary based where predefined strings
|
|
are replaced with their equivalent addresses from the built binary
|
|
image file in log output. This reduces the size required to store
|
|
the log output when there are long format strings to be logged.
|
|
|
|
This should be selected by the backend automatically.
|
|
|
|
config LOG_IMMEDIATE_CLEAN_OUTPUT
|
|
bool "Clean log output"
|
|
depends on LOG_MODE_IMMEDIATE
|
|
help
|
|
If enabled, interrupts are locked during whole log message processing.
|
|
As a result, processing on one log message cannot be interrupted by
|
|
another one and output is clean, not interleaved. However, enabling
|
|
this option is causing interrupts locking for significant amount of
|
|
time (up to multiple milliseconds).
|
|
|
|
config LOG_BACKEND_SHOW_COLOR
|
|
bool "Colors in the backend"
|
|
depends on LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \
|
|
|| LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM
|
|
default y
|
|
help
|
|
When enabled selected backend prints errors in red and warning in yellow.
|
|
|
|
if LOG_BACKEND_SHOW_COLOR
|
|
|
|
config LOG_INFO_COLOR_GREEN
|
|
bool "Use green color for info level logs"
|
|
|
|
endif # LOG_BACKEND_SHOW_COLOR
|
|
|
|
config LOG_TAG_MAX_LEN
|
|
int "Tag max length"
|
|
default 0
|
|
range 0 64
|
|
help
|
|
Setting non-zero value enables option to specify a tag which is
|
|
prepended to each log message. Tag can be changed at runtime.
|
|
|
|
config LOG_TAG_DEFAULT
|
|
string "Default tag"
|
|
depends on LOG_TAG_MAX_LEN > 0
|
|
default ""
|
|
help
|
|
Initial tag.
|
|
|
|
config LOG_BACKEND_FORMAT_TIMESTAMP
|
|
bool "Timestamp formatting in the backend"
|
|
depends on LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \
|
|
|| LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM || LOG_BACKEND_FS
|
|
default y
|
|
help
|
|
When enabled timestamp is formatted to hh:mm:ss:ms,us.
|
|
|
|
config LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP
|
|
bool "Format timestamp in Linux format"
|
|
default n
|
|
help
|
|
This formatting is something in the middle between the pure raw format
|
|
and the hh:mm:ss:ms,us one. It resembles the Linux's kernel format in
|
|
which timestamps are printed as fixed point values with seconds on the
|
|
left side of the point and microseconds on the right side.
|
|
|
|
endmenu
|