[U-Boot] [PATCH 01/15] log: Add helpers for common log levels

sjg at google.com
2018-10-09T23:51:49Z

At present to output a log message you need something like:

log(UCLASS_SPI, LOCL_INFO, "message1");
log(UCLASS_SPI, LOCL_INFO, "message2");

but many files use the same category throughout. Also it is helpful to
shorten the length of log names, providing helpers for common logging
levels. Add some macros so that it is possible to do:

(top of file, before #includes)
#define LOG_CATEGORY UCLASS_SPI

(later in the file)
log_info("message1");
log_debug("message2");
log_err("message3");

Signed-off-by: Simon Glass <sjg@chromium.org>
---

include/log.h | 14 ++++++++++++++
test/log/log_test.c | 13 +++++++++++++
test/py/tests/test_log.py | 6 ++++++
3 files changed, 33 insertions(+)

Applied to u-boot-dm