Skip to content

Log library enhancements

David Marchand dpdk-dev 3 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v32 Latest12 patches 1 replyApplied
  2. v31 posting 2/20 of 12 patches 0 repliesSuperseded
  3. v31 posting 1/212 patches 1 replySuperseded

Changes in v32 from the cover letter

- rebased,
- fixed build with MSVC: escape character was restored to \033 (used until v25) instead of \e,

Patches in v32 Applied

#Subject and filesSizeRepliesApplied
1/12eal/windows: align getopt to FreeBSDlib/eal/windows/getopt.c lib/eal/windows/include/getopt.h+16 -150 replies
1/12eal/windows: align getopt to FreeBSDlib/eal/windows/getopt.c lib/eal/windows/include/getopt.h+16 -150 replies
2/12eal: factorize parser for log levellib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+41 -1160 replies
2/12eal: factorize parser for log levellib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+41 -1160 replies
3/12eal: introduce log options parserlib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+32 -200 replies
3/12eal: introduce log options parserlib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+32 -200 replies
4/12eal: do not log init failure twicelib/eal/freebsd/eal.c lib/eal/linux/eal.c lib/eal/windows/eal.c+3 -60 replies
4/12eal: do not log init failure twicelib/eal/freebsd/eal.c lib/eal/linux/eal.c lib/eal/windows/eal.c+3 -60 replies
5/12eal: improve exit output loglib/eal/common/eal_common_debug.c+2 -40 replies
5/12eal: improve exit output loglib/eal/common/eal_common_debug.c+2 -40 replies
6/12log: rework syslog handlingapp/test/test_eal_flags.c doc/guides/freebsd_gsg/freebsd_eal_parameters.rst doc/guides/prog_guide/env_abstraction_layer.rst +16 more+220 -1980 replies
6/12log: rework syslog handlingapp/test/test_eal_flags.c doc/guides/freebsd_gsg/freebsd_eal_parameters.rst doc/guides/prog_guide/env_abstraction_layer.rst +16 more+220 -1980 replies
7/12eal: initialize log before everything elsedoc/guides/rel_notes/release_24_11.rst lib/eal/freebsd/eal.c lib/eal/linux/eal.c +1 more+28 -110 replies
7/12eal: initialize log before everything elsedoc/guides/rel_notes/release_24_11.rst lib/eal/freebsd/eal.c lib/eal/linux/eal.c +1 more+28 -110 replies
8/12log: add hook for printing log messageslib/log/log.c+7 -10 replies
8/12log: add hook for printing log messageslib/log/log.c+7 -10 replies
9/12log: add timestamp optionapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst doc/guides/rel_notes/release_24_11.rst +9 more+344 -60 replies
9/12log: add timestamp optionapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst doc/guides/rel_notes/release_24_11.rst +9 more+344 -60 replies
10/12log: support systemd journaldoc/guides/rel_notes/release_24_11.rst lib/log/log.c lib/log/log_internal.h +4 more+200 -120 replies
10/12log: support systemd journaldoc/guides/rel_notes/release_24_11.rst lib/log/log.c lib/log/log_internal.h +4 more+200 -120 replies
11/12log: colorize log outputapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst doc/guides/rel_notes/release_24_11.rst +9 more+312 -50 replies
11/12log: colorize log outputapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst doc/guides/rel_notes/release_24_11.rst +9 more+312 -50 replies
12/12maintainers: update for log libraryMAINTAINERS+1 -00 replies
12/12maintainers: update for log libraryMAINTAINERS+1 -00 replies

Reviews trailers per patch

22 of 24 patches have a Reviewed-by or Acked-by.

PatchTyler RetzlaffMorten BrørupBruce RichardsonChengwen FengDmitry Kozlyuk
1/12A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
1/12A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
2/12A-b A-b A-b A-b A-b A-b
2/12A-b A-b A-b A-b A-b A-b
3/12
3/12
4/12A-b A-b A-b A-b A-b A-b A-b A-b
4/12A-b A-b A-b A-b A-b A-b A-b A-b
5/12A-b A-b A-b A-b A-b A-b A-b A-b
5/12A-b A-b A-b A-b A-b A-b A-b A-b
6/12A-b A-b A-b A-b A-b A-b
6/12A-b A-b A-b A-b A-b A-b
7/12A-b A-b A-b A-b A-b A-b A-b A-b
7/12A-b A-b A-b A-b A-b A-b A-b A-b
8/12A-b A-b A-b A-b A-b A-b
8/12A-b A-b A-b A-b A-b A-b
9/12A-b A-b A-b A-b
9/12A-b A-b A-b A-b
10/12A-b A-b A-b A-b
10/12A-b A-b A-b A-b
11/12A-b A-b A-b A-b A-b A-b
11/12A-b A-b A-b A-b A-b A-b
12/12A-b A-b A-b A-b A-b A-b A-b A-b
12/12A-b A-b A-b A-b A-b A-b A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v32 thread

Cover letter [PATCH v32 00/12] Log library enhancements

Improvements and unification of logging library.
This version works on all platforms: Linux, Windows and FreeBSD.

This is update to rework patch set. It adds several new features to the console log output.

* Putting a timestamp on console output which is useful for analyzing performance of startup codes. Timestamp is optional and must be enabled on command line.

* Displaying console output with colors.
It uses the standard conventions used by many other Linux commands for colorized display. The default is to enable color if the console output is going to a terminal. But it can be always on or disabled by command line flag. This default was chosen based on what dmesg(1) command does.

Color is used by many tools (vi, iproute2, git) because it is helpful; DPDK drivers and libraries print lots of not very useful messages. And having error messages highlighted in bold face helps. This might also get users to pay more attention to error messages. Many bug reports have earlier messages that are lost because there are so many info messages.

* Add support for automatic detection of systemd journal protocol. If running as systemd service will get enhanced logging.

* Use of syslog is optional and the meaning of the --syslog flag has changed. The default is *not* to use unless requested.

Add Stephen as maintainer for log because by now have added more than previous authors.

Resending for CI:

Changes since v31:
- rebased,
- fixed build with MSVC: escape character was restored to \033 (used until v25) instead of \e,

Changes since v30:
- added a little helper that identifies log options (this fixed a little bug with the color option being parsed twice) and
renamed eal_log_level_parse() as eal_parse_log_options(),
- adjusted log level to ALERT for EAL error on Windows,
- split RN updates in relevant patches and fixed style,
- fixed --syslog usage string,
- split and squashed Windows shim update in relevant patches,
- fixed typos,
- cleaned duplicate inclusion of headers,
- moved syslog facility code update in relevant patch,
- removed dead reference to eal_log_set_default,

Signature · 58 lines
David Marchand

David Marchand (1):
  eal: introduce log options parser

Stephen Hemminger (11):
  eal/windows: align getopt to FreeBSD
  eal: factorize parser for log level
  eal: do not log init failure twice
  eal: improve exit output log
  log: rework syslog handling
  eal: initialize log before everything else
  log: add hook for printing log messages
  log: add timestamp option
  log: support systemd journal
  log: colorize log output
  maintainers: update for log library

 MAINTAINERS                                   |   1 +
 app/test/test_eal_flags.c                     |  64 ++++-
 .../freebsd_gsg/freebsd_eal_parameters.rst    |  27 ++
 .../prog_guide/env_abstraction_layer.rst      |   6 +-
 doc/guides/prog_guide/log_lib.rst             |  58 ++++-
 doc/guides/rel_notes/release_24_11.rst        |  16 ++
 lib/eal/common/eal_common_debug.c             |   6 +-
 lib/eal/common/eal_common_options.c           | 132 ++++++----
 lib/eal/common/eal_internal_cfg.h             |   1 -
 lib/eal/common/eal_options.h                  |   6 +
 lib/eal/freebsd/eal.c                         |  63 +----
 lib/eal/linux/eal.c                           |  66 +----
 lib/eal/windows/eal.c                         |  51 +---
 lib/eal/windows/getopt.c                      |  23 +-
 lib/eal/windows/include/getopt.h              |   8 +-
 lib/eal/windows/include/rte_os_shim.h         |  12 +
 lib/log/log.c                                 |  82 ++++--
 lib/log/log_color.c                           | 214 ++++++++++++++++
 lib/log/log_freebsd.c                         |  12 -
 lib/log/log_internal.h                        |  28 +-
 lib/log/log_journal.c                         | 153 +++++++++++
 lib/log/log_linux.c                           |  61 -----
 lib/log/log_private.h                         |  57 +++++
 lib/log/log_syslog.c                          | 108 ++++++++
 lib/log/log_timestamp.c                       | 240 ++++++++++++++++++
 lib/log/log_windows.c                         |  18 --
 lib/log/meson.build                           |  12 +-
 lib/log/version.map                           |   5 +-
 28 files changed, 1171 insertions(+), 359 deletions(-)
 create mode 100644 lib/log/log_color.c
 delete mode 100644 lib/log/log_freebsd.c
 create mode 100644 lib/log/log_journal.c
 delete mode 100644 lib/log/log_linux.c
 create mode 100644 lib/log/log_private.h
 create mode 100644 lib/log/log_syslog.c
 create mode 100644 lib/log/log_timestamp.c
 delete mode 100644 lib/log/log_windows.c

-- 
2.47.0