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 default y if LOG_BACKEND_UART || LOG_BACKEND_NATIVE_POSIX || LOG_BACKEND_RTT \ 138 || LOG_BACKEND_SWO || LOG_BACKEND_XTENSA_SIM || SHELL_LOG_BACKEND 139 help 140 When enabled selected backend prints errors in red and warning in yellow. 141 142if LOG_BACKEND_SHOW_COLOR 143 144config LOG_INFO_COLOR_GREEN 145 bool "Use green color for info level logs" 146 147config LOG_DBG_COLOR_BLUE 148 bool "Use blue color for debug level logs" 149 150endif # LOG_BACKEND_SHOW_COLOR 151 152config LOG_TAG_MAX_LEN 153 int "Tag max length" 154 default 0 155 range 0 64 156 help 157 Setting non-zero value enables option to specify a tag which is 158 prepended to each log message. Tag can be changed at runtime. 159 160config LOG_TAG_DEFAULT 161 string "Default tag" 162 depends on LOG_TAG_MAX_LEN > 0 163 default "" 164 help 165 Initial tag. 166 167config LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP 168 bool 169 help 170 Selected by log backends that supports timestamp formatting. 171 172config LOG_BACKEND_FORMAT_TIMESTAMP 173 bool "Timestamp formatting in the backend" 174 depends on LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP 175 default y 176 help 177 When enabled timestamp is formatted. 178 179choice LOG_BACKEND_FORMAT_TIMESTAMP_MODE 180 prompt "Timestamp format mode" 181 default LOG_OUTPUT_FORMAT_DATE_TIMESTAMP if LOG_TIMESTAMP_USE_REALTIME && POSIX_C_LANG_SUPPORT_R 182 default LOG_OUTPUT_FORMAT_TIME_TIMESTAMP 183 184config LOG_OUTPUT_FORMAT_TIME_TIMESTAMP 185 bool "Format timestamp in time format" 186 help 187 When enabled timestamp is formatted to hh:mm:ss.ms,us. 188 189config LOG_OUTPUT_FORMAT_DATE_TIMESTAMP 190 bool "Format timestamp in date format" 191 depends on POSIX_C_LANG_SUPPORT_R 192 help 193 When enabled timestamp is formatted to YYYY-MM-DD hh:mm:ss.ms,us. 194 195config LOG_OUTPUT_FORMAT_ISO8601_TIMESTAMP 196 bool "Format timestamp in ISO 8601 format" 197 depends on POSIX_C_LANG_SUPPORT_R 198 help 199 When enabled timestamp is formatted to YYYY-MM-DDThh:mm:ss,ffffffZ. 200 201config LOG_OUTPUT_FORMAT_LINUX_TIMESTAMP 202 bool "Format timestamp in Linux format" 203 help 204 This formatting is something in the middle between the pure raw format 205 and the hh:mm:ss:ms,us one. It resembles the Linux's kernel format in 206 which timestamps are printed as fixed point values with seconds on the 207 left side of the point and microseconds on the right side. 208 209config LOG_OUTPUT_FORMAT_CUSTOM_TIMESTAMP 210 bool "Custom timestamp format support" 211 help 212 Enable support for custom formatter for the timestamp. 213 It will be applied to all backends except the syslog net backend. 214 215endchoice 216 217endmenu 218