log: Add a Kconfig option to set the default log level
At present the default log level is set to LOGL_INFO on start-up. Allow
this to be controlled from Kconfig.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/common/log.c b/common/log.c
index ec14644..ffb3cd6 100644
--- a/common/log.c
+++ b/common/log.c
@@ -316,7 +316,7 @@
}
gd->flags |= GD_FLG_LOG_READY;
if (!gd->default_log_level)
- gd->default_log_level = LOGL_INFO;
+ gd->default_log_level = CONFIG_LOG_DEFAULT_LEVEL;
gd->log_fmt = LOGF_DEFAULT;
return 0;