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