Commit 74ceae5b authored by Michael Scott's avatar Michael Scott Committed by Andrzej Puzdrowski
Browse files

boot: zephyr: establish an MCUBOOT_LOG_LEVEL config

Rather than use LOG_DEFAULT_LEVEL to control MCUBOOT's log output,
let's create an MCUBOOT specific log level setting.

Signed-off-by: default avatarMichael Scott <mike@foundries.io>
Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: default avatarKrzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
parent cef4427d
Loading
Loading
Loading
Loading
+8 −1
Changes for boot/zephyr/Kconfig: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -140,9 +140,16 @@ config BOOT_HAVE_LOGGING
	select LOG_IMMEDIATE
	help
	  If y, enables logging on the serial port. The log level can
	  be defined by setting `LOG_DEFAULT_LEVEL`.
	  be defined by setting `CONFIG_MCUBOOT_LOG_LEVEL_*`.
	  If unsure, leave at the default value.

if BOOT_HAVE_LOGGING
module = MCUBOOT
module-dep = LOG
module-str = Log level for MCUBOOT application
source "subsys/logging/Kconfig.template.log_config"
endif

menuconfig MCUBOOT_SERIAL
	bool "MCUboot serial recovery"
	default n
+2 −2
Changes for boot/zephyr/include/mcuboot_config/mcuboot_logging.h: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@
 * logging subsystem.
 */

#define MCUBOOT_LOG_MODULE_DECLARE(domain)	LOG_MODULE_DECLARE(domain)
#define MCUBOOT_LOG_MODULE_REGISTER(domain)	LOG_MODULE_REGISTER(domain)
#define MCUBOOT_LOG_MODULE_DECLARE(domain)	LOG_MODULE_DECLARE(domain, CONFIG_MCUBOOT_LOG_LEVEL)
#define MCUBOOT_LOG_MODULE_REGISTER(domain)	LOG_MODULE_REGISTER(domain, CONFIG_MCUBOOT_LOG_LEVEL)

#define MCUBOOT_LOG_ERR(...) LOG_ERR(__VA_ARGS__)
#define MCUBOOT_LOG_WRN(...) LOG_WRN(__VA_ARGS__)