Hi Heinrich, On Mon, 27 Jul 2020 at 00:15, Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > On 7/27/20 4:27 AM, Simon Glass wrote: > > 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. > > > > Signed-off-by: Simon Glass <s...@chromium.org> > > Hello Simon, > > we have different debug levels: > > LOGL_DEBUG > LOGL_DEBUG_CONTENT > LOGL_DEBUG_IO > > If I understand you right, with your patch putting #define LOG_DEBUG at > the top of the file enables all of these. This may be more than I want. > > Wouldn't it be more flexible if we could put something like: > > #define LOG_DEBUG LOGL_DEBUG > > at the top of the file if we want logging up to level 7 in this file.
Actually the way I implemented it, it only enables update LOGL_DEBUG. Certainly your idea is more flexible. I wonder if we could make the level optional, so: #define LOG_DEBUG means #define LOG_DEBUG LOGL_DEBUG Regards, Simon