[PATCH v2] log: force DEBUG when LOG_DEBUG is activated

Simon Glass sjg at chromium.org
Tue Jul 26 21:52:53 CEST 2022


When CONFIG_LOG is activated, if LOG_DEBUG is defined in a file and
DEBUG is not defined the trace with debug() macro are not displayed,
because the parameter cond : _DEBUG = 0 is checked in debug_cond().

With this patch the define DEBUG, used to force the trace generated by
debug() macro, is linked with the define LOG_DEBUG, used to force the
trace generated by other macros (log_debug, dev_dbg, pr_debug).

We only need to define LOG_DEBUG in a file to activate all the
traces generated by any U-Boot debug macro, as it is described in
/doc/develop/logging.rst

Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
---

Changes in v2:
- update logging.rst

 doc/develop/logging.rst | 19 +++++++------------
 include/log.h           |  3 +++
 2 files changed, 10 insertions(+), 12 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list