aboutsummaryrefslogtreecommitdiff
path: root/doc/README.log
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-02-16 20:24:37 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-02-20 15:21:44 +0800
commitf9811e8575eb42e75c615ba9b44f0481cdb78330 (patch)
tree8eb5ef4d0bb4529d4bb2d017310881023e8273b7 /doc/README.log
parent8dee7b96fd6eaea54400aaf317f72aac9b323b58 (diff)
downloadu-boot-f9811e8575eb42e75c615ba9b44f0481cdb78330.zip
u-boot-f9811e8575eb42e75c615ba9b44f0481cdb78330.tar.gz
u-boot-f9811e8575eb42e75c615ba9b44f0481cdb78330.tar.bz2
log: Allow #define LOG_DEBUG to enable logging in a file
At present it is possible to '#define DEBUG' at the top of a file which causes all debug() statements in that file to become active. There is currently no equivalent with logging, but this is a useful function. Add a LOG_DEBUG define along with documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'doc/README.log')
-rw-r--r--doc/README.log15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/README.log b/doc/README.log
index 75350ec..19856d4 100644
--- a/doc/README.log
+++ b/doc/README.log
@@ -69,6 +69,21 @@ If CONFIG_LOG is not set, then no logging will be available.
The above have SPL versions also, e.g. CONFIG_SPL_MAX_LOG_LEVEL.
+Temporary logging within a single file
+--------------------------------------
+
+Sometimes it is useful to turn on logging just in one file. You can use this:
+
+ #define LOG_DEBUG
+
+to enable building in of all logging statements in a single file. Put it at
+the top of the file, before any #includes.
+
+To actually get U-Boot to output this you need to also set the default logging
+level - e.g. set CONFIG_LOG_DEFAULT_LEVEL to 7 (LOGL_DEBUG) or more. Otherwise
+debug output is suppressed and will not be generated.
+
+
Convenience functions
---------------------