Skip to content

Commit d32dc5a

Browse files
committed
logging: Default to redirecting printk() through it
Default to redirecting the printk() calls through the logging subsystem using the special logginng log_printk() function that encapsulates raw strings into buffers and prints them as-is, without any of the logger additional metadata. This has 2 advantages: * Removes potential race conditions between printk() and the logger backend usage of the UART or any other backend * Printsk the printk() statements in-order with the rest of the logs, since now by default printk() messages are deferred Disadvantages: * printk() statements are limited in length * Additional memory consumption by default Signed-off-by: Carles Cufi <[email protected]>
1 parent 51574c1 commit d32dc5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/logging/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ config LOG_MAX_LEVEL
185185

186186
config LOG_PRINTK
187187
bool "Enable processing of printk messages."
188+
default y
188189
help
189190
LOG_PRINTK messages are formatted in place and logged unconditionally.
190191

0 commit comments

Comments
 (0)