[PATCH v3 1/2] log: don't show function by default

Simon Glass sjg at chromium.org
Wed Jun 17 01:31:46 CEST 2020


Hi Heinrich,

On Mon, 15 Jun 2020 at 13:24, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> The name of the function emitting a log message may be of interest for a
> developer but is distracting for normal users. See the example below:
>
>     try_load_entry() Booting: Debian
>
> Make the default format for log messages customizable. By default show
> only the message text.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v3:
>         replace #ifdef by IS_ENABLED()
> ---
>  cmd/log.c                 |  4 ++--
>  common/Kconfig            | 18 ++++++++++++++++++
>  common/log.c              |  2 +-
>  include/log.h             | 19 +++++++++++++++++--
>  test/log/syslog_test.c    | 20 ++++++++++++++------
>  test/py/tests/test_log.py |  2 ++
>  6 files changed, 54 insertions(+), 11 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>

nit below

[..]

> diff --git a/include/log.h b/include/log.h
> index df65398c04..21f9b75278 100644
> --- a/include/log.h
> +++ b/include/log.h
> @@ -12,6 +12,7 @@
>  #include <stdio.h>
>  #include <linker_lists.h>
>  #include <dm/uclass-id.h>
> +#include <linux/bitops.h>
>  #include <linux/list.h>
>
>  struct cmd_tbl;
> @@ -409,9 +410,7 @@ enum log_fmt {
>         LOGF_LINE,
>         LOGF_FUNC,
>         LOGF_MSG,
> -

Can we keep that? I makes it easier to see the 'real' enum values and
the ones that are used for maintenance below:

>         LOGF_COUNT,
> -       LOGF_DEFAULT = (1 << LOGF_FUNC) | (1 << LOGF_MSG),
>         LOGF_ALL = 0x3f,
>  };
>
> @@ -460,4 +459,20 @@ static inline int log_init(void)
>  }
>  #endif
>

Regards,
Simon


More information about the U-Boot mailing list