[PATCH 0/4] log: Allow multiple lines and conversion to printf()

Simon Glass sjg at chromium.org
Thu Jan 14 04:30:47 CET 2021


At present when logging is not enabled, all log calls become nops. This
does not seem right, since if the log level is high enough then there
should be some sort of message. So in that case, this series updates it to
print the message if the log level is above LOGL_INFO.

Also the current implementation does not support multiple log calls on the
same line nicely. The tags are repeated so the line is very hard to read.
This series adds that as a new feature.


Simon Glass (4):
  log: Set up a flag byte for log records
  log: Handle line continuation
  log: Add return-checking macros for 0 being success
  log: Convert log values to printf() if not enabled

 common/log.c                      | 12 ++++++--
 common/log_console.c              | 26 ++++++++++-------
 doc/develop/logging.rst           | 36 +++++++++++++++++++++--
 include/asm-generic/global_data.h |  6 ++++
 include/log.h                     | 48 +++++++++++++++++++++++++------
 test/log/cont_test.c              | 19 +++++++++---
 6 files changed, 118 insertions(+), 29 deletions(-)

-- 
2.30.0.284.gd98b1dd5eaa7-goog



More information about the U-Boot mailing list