Skip to content

Commit

Permalink
Merge pull request #17286 from leandrolanzieri/pr/sys/log/model_kconfig
Browse files Browse the repository at this point in the history
sys/log: model Kconfig
  • Loading branch information
fjmolinas authored Dec 2, 2021
2 parents 662aba4 + 5913025 commit fea525f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ rsource "Kconfig.picolibc"

endmenu # Libc

rsource "log/Kconfig"
rsource "luid/Kconfig"
rsource "malloc_thread_safe/Kconfig"
rsource "matstat/Kconfig"
Expand Down
32 changes: 32 additions & 0 deletions sys/log/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2021 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#


menuconfig MODULE_LOG
bool "Logging system override"
depends on TEST_KCONFIG
help
Say y to override the default logging functions. For more information see
core/include/log.h.

choice LOG_BACKEND
bool "Implementation"
depends on MODULE_LOG

config MODULE_LOG_COLOR
bool "Colored output"
help
Implements a logging module with colored output.

config MODULE_LOG_PRINTFNOFORMAT
bool "puts-based log"
help
Logging is implemented using puts instead of printf. Use it where printf
might be too heavy. This also serves as an example for logging
implementation.

endchoice
2 changes: 2 additions & 0 deletions tests/log_color/app.config.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_MODULE_LOG=y
CONFIG_MODULE_LOG_COLOR=y
2 changes: 2 additions & 0 deletions tests/log_printfnoformat/app.config.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_MODULE_LOG=y
CONFIG_MODULE_LOG_PRINTFNOFORMAT=y

0 comments on commit fea525f

Please sign in to comment.