Timestamps can be 32 or 64 bit long based on the platform and build configurations. The proper way to handle these timestamps is to use the ad-hoc log_timestamp_t variable. This patch fixes some timestamp's reference which were still using uint32_t changing them to log_timestamp_t. Moreover also a new config is added in order to print the timestamp as the Linux's kernel format. This might be useful in AMP platforms in which Linux's and Zephyr's logs must be interleaved in order to get a more comprehensive log solution. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
101 lines
2.9 KiB
Plaintext
101 lines
2.9 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_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
|