]> git.baikalelectronics.ru Git - uboot.git/commit
log: Convert log values to printf() if not enabled
authorSimon Glass <sjg@chromium.org>
Sat, 8 May 2021 19:46:54 +0000 (13:46 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 8 Jun 2021 15:39:09 +0000 (11:39 -0400)
commitb1a90b5d8e8d9c3d136af8ff76e9162d0f7bbb41
tree338db8b14138d67a2969b677258873c30aa8f03e
parent17940b453c5e10bb048f1a9ad656da5aaf8645d3
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>
doc/develop/logging.rst
include/log.h
test/log/Makefile
test/log/nolog_ndebug.c [new file with mode: 0644]
test/log/nolog_test.c