aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-12 11:13:34 -0600
committerTom Rini <trini@konsulko.com>2020-10-10 16:49:58 -0400
commit52d3df7fefe30b05677db9055e68c666a071d89a (patch)
tree949ff257975a134f8fbf923debec6f8bd013cce6 /doc
parent0437cc415517c06c864bee5dbce3001d70b2c2cb (diff)
downloadu-boot-52d3df7fefe30b05677db9055e68c666a071d89a.zip
u-boot-52d3df7fefe30b05677db9055e68c666a071d89a.tar.gz
u-boot-52d3df7fefe30b05677db9055e68c666a071d89a.tar.bz2
log: Allow LOG_DEBUG to always enable log output
At present if CONFIG_LOG enabled, putting LOG_DEBUG at the top of a file (before log.h inclusion) causes _log() to be executed for every log() call, regardless of the build- or run-time logging level. However there is no guarantee that the log record will actually be displayed. If the current log level is lower than LOGL_DEBUG then it will not be. Add a way to signal that the log record should always be displayed and update log_passes_filters() to handle this. With the new behaviour, log_debug() will always log if LOG_DEBUG is enabled. Move log_test_syslog_nodebug() into its own file since it cannot be made to work where it is, with LOG_DEBUG defined. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/README.log7
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/README.log b/doc/README.log
index ba83882..a313399 100644
--- a/doc/README.log
+++ b/doc/README.log
@@ -78,11 +78,8 @@ 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.
+the top of the file, before any #includes. This overrides any log-level setting
+in U-Boot, including CONFIG_LOG_DEFAULT_LEVEL, but just for that file.
Convenience functions