1# Copyright (c) 2021 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4menu "Output Formatting" 5 6menu "Prepend non-hexdump log message with function name" 7 depends on !LOG_FRONTEND_ONLY 8 9config LOG_FUNC_NAME_PREFIX_ERR 10 bool "Error messages prepended" 11 12config LOG_FUNC_NAME_PREFIX_WRN 13 bool "Warning messages prepended" 14 15config LOG_FUNC_NAME_PREFIX_INF 16 bool "Info messages prepended" 17 18config LOG_FUNC_NAME_PREFIX_DBG 19 bool "Debug messages prepended" 20 default y 21 22endmenu 23 24menuconfig LOG_MIPI_SYST_ENABLE 25 bool "MIPI SyS-T format output" 26 select MIPI_SYST_LIB 27 select LOG_OUTPUT 28 help 29 Enable MIPI SyS-T format output for the logger system. 30 31if LOG_MIPI_SYST_ENABLE 32 33config LOG_MIPI_SYST_USE_CATALOG 34 bool "Use MIPI Sys-T Catalog for logging" 35 depends on !PICOLIBC 36 select LOG_FMT_SECTION 37 select LOG_USE_TAGGED_ARGUMENTS 38 help 39 Use MIPI Sys-T Catalog for logging instead of plain text. 40 41config LOG_MIPI_SYST_CATALOG_ARGS_BUFFER_SIZE 42 int "Size of temporary arguments buffer when using Sys-T Catalog" 43 depends on LOG_MIPI_SYST_USE_CATALOG 44 default 1024 45 help 46 The size (in bytes) of the temporary buffer to store the expanded 47 argument list needed for the MIPI Sys-T library for processing 48 catalog messages. 49 50config LOG_MIPI_SYST_ARGS_BUFFER_SIZE 51 int "Buffer size in bytes" 52 default 1024 53 help 54 This user-configurable option specifies the maximum size (in bytes) to reserve in 55 the call stack for processing the logging format strings MIPI Sys-T library. 56 Increasing it will allow for longer strings to be logged at the expense of used 57 stack space. Conversely decreasing it will lessen the stack burden at the expense 58 of shorter maximum log strings. 59 60config LOG_MIPI_SYST_OUTPUT_LOG_MSG_SRC_ID 61 bool "Output Log Message Source ID as Module ID" 62 default y if LOG_MIPI_SYST_USE_CATALOG 63 help 64 Enable this option to output the log message source ID 65 as the Sys-T message module ID (as in origin unit in Sys-T 66 message header). 67 68config LOG_MIPI_SYST_MSG_DEFAULT_MODULE_ID 69 int "Default module ID in Sys-T message" 70 range 0 127 71 default 127 if LOG_MIPI_SYST_OUTPUT_LOG_MSG_SRC_ID 72 default 0 73 help 74 The default module ID embedded in the origin unit in 75 Sys-T message header. 76 77 If CONFIG_LOG_MIPI_SYST_OUTPUT_LOG_MSG_SRC_ID is disabled, 78 this will be used for all Sys-T messages. 79 80 If CONFIG_LOG_MIPI_SYST_OUTPUT_LOG_MSG_SRC_ID is enabled, 81 this will be used for log messages without source IDs, 82 for example, printk() if CONFIG_LOG_PRINTK is enabled. 83 84config LOG_MIPI_SYST_MSG_DEFAULT_UNIT_ID 85 int "Default unit ID in Sys-T message" 86 range 0 15 87 default 0 88 help 89 The default unit ID embedded in the origin unit in 90 Sys-T message header. 91 92endif # LOG_MIPI_SYST_ENABLE 93 94config LOG_DICTIONARY_SUPPORT 95 bool 96 select LOG_DICTIONARY_DB 97 help 98 Enable support for dictionary based logging. 99 100 Dictionary based logging is binary based where predefined strings 101 are replaced with their equivalent addresses from the built binary 102 image file in log output. This reduces the size required to store 103 the log output when there are long format strings to be logged. 104 105 This should be selected by the backend automatically. 106 107config LOG_THREAD_ID_PREFIX 108 bool "Thread ID prefix" 109 help 110 Enable support for prefixing log message with thread name or ID. 111 Thread name is used if THREAD_NAME is enabled. 112 113config LOG_CUSTOM_FORMAT_SUPPORT 114 bool "Custom format support" 115 default n 116 help 117 Enable support for custom formatter. 118 Allows custom format callbacks registering for logging backend. 119 120config LOG_IMMEDIATE_CLEAN_OUTPUT 121 bool "Clean log output" 122 depends on LOG_MODE_IMMEDIATE 123 help 124 If enabled, interrupts are locked during whole log message processing. 125 As a result, processing on one log message cannot be interrupted by 126 another one and output is clean, not interleaved. However, enabling 127 this option is causing interrupts locking for significant amount of 128 time (up to multiple milliseconds). 129 130config LOG_BACKEND_SHOW_COLOR 131 bool "Colors in the backend" 132 depends on LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \ 133 || LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM 134 default y 135 help 136 When enabled selected backend prints errors in red and warning in yellow. 137 138if LOG_BACKEND_SHOW_COLOR 139 140config LOG_INFO_COLOR_GREEN 141 bool "Use green color for info level logs" 142 143endif # LOG_BACKEND_SHOW_COLOR 144 145config LOG_TAG_MAX_LEN 146 int "Tag max length" 147 default 0 148 range 0 64 149 help 150 Setting non-zero value enables option to specify a tag which is 151 prepended to each log message. Tag can be changed at runtime. 152 153config LOG_TAG_DEFAULT 154 string "Default tag" 155 depends on LOG_TAG_MAX_LEN > 0 156 default "" 157 help 158 Initial tag. 159 160config LOG_BACKEND_FORMAT_TIMESTAMP 161 bool "Timestamp formatting in the backend" 162 depends on LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \ 163 || LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM || LOG_BACKEND_FS \ 164 || LOG_BACKEND_ADSP || LOG_BACKEND_ADSP_HDA || LOG_BACKEND_ADSP_MTRACE 165 default y 166 help 167 When enabled timestamp is formatted to hh:mm:ss:ms,us. 168 169config LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP 170 bool "Format timestamp in Linux format" 171 help 172 This formatting is something in the middle between the pure raw format 173 and the hh:mm:ss:ms,us one. It resembles the Linux's kernel format in 174 which timestamps are printed as fixed point values with seconds on the 175 left side of the point and microseconds on the right side. 176 177config LOG_OUTPUT_FORMAT_CUSTOM_TIMESTAMP 178 bool "Custom timestamp format support" 179 help 180 Enable support for custom formatter for the timestamp. 181 It will be applied to all backends. 182 183endmenu 184