aboutsummaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-08 17:18:35 -0400
committerTom Rini <trini@konsulko.com>2021-06-08 17:18:35 -0400
commitda29243251651e631d916b3554ad1ee57134793b (patch)
tree338db8b14138d67a2969b677258873c30aa8f03e /doc/develop
parent24e1e8841c59956aaf0bd65720d0dbdd61aa3632 (diff)
parente1cbd916c86cbfdb87a7b2219624057428c285d4 (diff)
downloadu-boot-da29243251651e631d916b3554ad1ee57134793b.zip
u-boot-da29243251651e631d916b3554ad1ee57134793b.tar.gz
u-boot-da29243251651e631d916b3554ad1ee57134793b.tar.bz2
Merge branch '2021-06-08-display-and-logging-updates' into next
To quote Simon, first for the display changes: At present we have two ways of showing a hex dump. Once has been in U-Boot since the dawn of time and the other was recently added from Linux. They both have their own unique features. This series makes a few changes to bring them closer together. It also adds support for logging a buffer, which is useful since it can put it through the same log drivers as other logging output. Also it adds tests, so we can check the behaviour. And then the logging changes: 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. This mimics the behaviour for the log_...() macros like log_debug() and log_info(), so we can drop the special case for these. 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.
Diffstat (limited to 'doc/develop')
-rw-r--r--doc/develop/logging.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/develop/logging.rst b/doc/develop/logging.rst
index f4e9250..51095b0 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()