Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | # # Copyright (c) 2016 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # menu "Logging Options" config SYS_LOG bool "Enable Logging" depends on PRINTK help Global switch for logging, when turned off log calls will not be executed. config SYS_LOG_SHOW_TAGS bool "Prepend level tags to logs" depends on SYS_LOG default y help Prefixes all log lines with an identifier to the log level submitted in the C code. config SYS_LOG_SHOW_COLOR bool "Use colored logs" depends on SYS_LOG help Use color in the logs. This requires an ANSI capable terminal. config SYS_LOG_DEFAULT_LEVEL int "Default log level" depends on SYS_LOG default 0 range 0 4 help Sets log level for modules which don't specify it explicitly. When set to 0 it means log wont be activated for those modules. Levels are: 0 OFF, do not write by default 1 ERROR, default to only write SYS_LOG_ERR 2 WARNING, default to write SYS_LOG_WRN in addition to previous level 3 INFO, default to write SYS_LOG_INF in addition to previous levels 4 DEBUG, default to write SYS_LOG_DBG in addition to previous levels config SYS_LOG_OVERRIDE_LEVEL int "Override lowest log level" depends on SYS_LOG default 0 range 0 4 help Forces a minimum log level for all modules. Modules use their specified level if it is greater than this option, otherwise they use the level specified by this option instead of their default or whatever was manually set. Levels are: 0 OFF, do not override 1 ERROR, override to write SYS_LOG_ERR 2 WARNING, override to write SYS_LOG_WRN in addition to previous level 3 INFO, override to write SYS_LOG_INF in addition to previous levels 4 DEBUG, override to write SYS_LOG_DBG in addition to previous levels config SYS_LOG_EXT_HOOK bool "Use external hook function for logging" depends on SYS_LOG help Use external hook function for logging. config SYS_LOG_BACKEND_NET bool "Networking syslog backend" depends on SYS_LOG && NETWORKING select SYS_LOG_EXT_HOOK select NET_CONTEXT_NET_PKT_POOL help Send syslog messages to network server. See RFC 5424 (syslog protocol) and RFC 5426 (syslog over UDP) specifications for details. if SYS_LOG_BACKEND_NET config SYS_LOG_BACKEND_NET_SERVER string "Syslog server IP address" help This can be either IPv4 or IPv6 address. Server listen UDP port number can be configured here too. Following syntax is supported: 192.0.2.1:514 192.0.2.42 [2001:db8::1]:514 [2001:db8::2] 2001:db::42 config SYS_LOG_BACKEND_NET_MAX_BUF int "How many network buffers to allocate for sending messages" range 3 256 default 3 help Each syslog message will occupy one network buffer. config SYS_LOG_BACKEND_NET_MAX_BUF_SIZE int "Max syslog message size" range 64 1180 default 256 help As each syslog message needs to fit to UDP packet, set this value so that messages are not truncated. The RFC 5426 recommends that for IPv4 the size is 480 octets and for IPv6 the size is 1180 octets. As each buffer will use RAM, the value should be selected so that typical messages will fit the buffer. The total allocated memory will be SYS_LOG_BACKEND_NET_MAX_BUF * SYS_LOG_BACKEND_NET_MAX_BUF_SIZE endif config LOG bool "Enable Logger" help Global switch for the logger, when turned off log calls will not be compiled in. if LOG config LOG_RUNTIME_FILTERING bool "Enable runtime reconfiguration of the logger" help Allow runtime configuration of maximal, independent severity level for instance. choice prompt "Log full strategy" config LOG_MODE_OVERFLOW bool "Oldest logs are discarded" config LOG_MODE_NO_OVERFLOW bool "New logs are dropped" endchoice config LOG_DEFAULT_LEVEL int "Default log level" default 3 range 0 4 help Sets log level for modules which don't specify it explicitly. When set to 0 it means log will not be activated for those modules. Levels are: - 0 OFF, do not write by default - 1 ERROR, default to only write LOG_LEVEL_ERR - 2 WARNING, default to write LOG_LEVEL_WRN - 3 INFO, default to write LOG_LEVEL_INFO - 4 DEBUG, default to write LOG_LEVEL_DBG config LOG_OVERRIDE_LEVEL int "Override lowest log level" default 0 range 0 4 help Forces a minimum log level for all modules. Modules use their specified level if it is greater than this option, otherwise they use the level specified by this option instead of their default or whatever was manually set. Levels are: - 0 OFF, do not override - 1 ERROR, override to write LOG_LEVEL_ERR - 2 WARNING, override to write LOG_LEVEL_WRN - 3 INFO, override to write LOG_LEVEL_INFO - 4 DEBUG, override to write LOG_LEVEL_DBG config LOG_MAX_LEVEL int "Maximal log level compiled in the system" default 4 range 0 4 help Forces a maximal log level for all modules. Modules saturates their specified level if it is greater than this option, otherwise they use the level specified by this option instead of their default or whatever was manually set. Levels are: - 0 OFF, logging is turned off - 1 ERROR, maximal level set to LOG_LEVEL_ERR - 2 WARNING, maximal level set to LOG_LEVEL_WRN - 3 INFO, maximal level set to LOG_LEVEL_INFO - 4 DEBUG, maximal level set to LOG_LEVEL_DBG config LOG_PRINTK bool "Enable processing of printk messages." help LOG_PRINTK messages are formatted in place and logged unconditionally. config LOG_PRINTK_MAX_STRING_LENGTH int "Maximum string length supported by LOG_PRINTK" depends on LOG_PRINTK default 128 help Array is allocated on the stack. config LOG_INPLACE_PROCESS bool "Enable in place processing" help When enabled log is processed in the context of the call. It impacts performance of the system since time consuming operations are performed in the context of the log entry (e.g. high priority interrupt). When enabled LOG_BUFFER_SIZE can be reduced. Logger backends must support exclusive access to work flawlessly in that mode because one log operation can be interrupted by another one in higher priority context. config LOG_PROCESS_TRIGGER_THRESHOLD int "Amount of buffered logs which triggers processing thread." default 10 help When number of buffered messages reaches the threshold thread is waken up. Log processing thread ID is provided during log initialization. Set 0 to disable the feature. If LOG_PROCESS_THREAD is enabled then this threshold is used by the internal thread. config LOG_PROCESS_THREAD bool "Enable internal thread for log processing" depends on MULTITHREADING default y help When enabled thread is created by the logger subsystem. Thread is waken up periodically (see LOG_PROCESS_THREAD_SLEEP_MS) and whenever number of buffered messages exceeds the threshold (see LOG_PROCESS_TRIGGER_THR). if LOG_PROCESS_THREAD config LOG_PROCESS_THREAD_SLEEP_MS int "Set internal log processing thread sleep period" default 1000 help Log processing thread sleeps for requested period given in milliseconds. When waken up, thread process any buffered messages. config LOG_PROCESS_THREAD_PRIO int "Priority of the log internal thread" default -2 help Change with care since log processing can be time consuming thus it should be on low priority. config LOG_PROCESS_THREAD_STACK_SIZE int "Stack size for the internal log processing thread" default 768 help Set the internal stack size for log processing thread. endif config LOG_BUFFER_SIZE int "Number of bytes dedicated for the logger internal buffer." default 1024 range 128 65536 help Number of bytes dedicated for the logger internal buffer. config LOG_DOMAIN_ID int "Domain ID" default 0 range 0 7 help In multicore system each application/core must have unique domain ID. config LOG_BACKEND_UART bool "Enable UART backend" depends on UART_CONSOLE default y help When enabled backend is using UART to output logs. config LOG_BACKEND_UART_SHOW_COLOR bool "Enable colors in the UART backend" depends on LOG_BACKEND_UART default y help When enabled UART backend prints errors in red and warning in yellow. config LOG_BACKEND_UART_FORMAT_TIMESTAMP bool "Enable timestamp formatting in the UART backend" depends on LOG_BACKEND_UART default y help When enabled timestamp is formatted to hh:mm:ss:ms,us. endif endmenu |