diff options
author | Simon Glass <sjg@chromium.org> | 2021-05-08 13:46:54 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-06-08 11:39:09 -0400 |
commit | e1cbd916c86cbfdb87a7b2219624057428c285d4 (patch) | |
tree | 338db8b14138d67a2969b677258873c30aa8f03e /doc/develop | |
parent | 8d9bb98f8649222777193c6c161361e1ebd5e3fa (diff) | |
download | u-boot-e1cbd916c86cbfdb87a7b2219624057428c285d4.tar.gz u-boot-e1cbd916c86cbfdb87a7b2219624057428c285d4.tar.bz2 u-boot-e1cbd916c86cbfdb87a7b2219624057428c285d4.zip |
log: Convert log values to printf() if not enabled
At present if logging not enabled, log_info() becomes a nop. But we want
log output at the 'info' level to be akin to printf(). Update the macro to
pass the output straight to printf() in this case.
This mimics the behaviour for the log_...() macros like log_debug() and
log_info(), so we can drop the special case for these.
Add new tests to cover this case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/develop')
-rw-r--r-- | doc/develop/logging.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/develop/logging.rst b/doc/develop/logging.rst index f4e925048e..51095b05ba 100644 --- a/doc/develop/logging.rst +++ b/doc/develop/logging.rst @@ -52,6 +52,10 @@ If CONFIG_LOG is not set, then no logging will be available. The above have SPL and TPL versions also, e.g. CONFIG_SPL_LOG_MAX_LEVEL and CONFIG_TPL_LOG_MAX_LEVEL. +If logging is disabled, the default behaviour is to output any message at +level LOGL_INFO and below. If logging is disabled and DEBUG is defined (at +the very top of a C file) then any message at LOGL_DEBUG will be written. + Temporary logging within a single file -------------------------------------- @@ -291,8 +295,6 @@ More logging destinations: Convert debug() statements in the code to log() statements -Support making printf() emit log statements at L_INFO level - Convert error() statements in the code to log() statements Figure out what to do with BUG(), BUG_ON() and warn_non_spl() |