Skip to content

Log library enhancements

Stephen Hemminger dpdk-dev 29 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v30 Latest13 patches 0 repliesNew
  2. v2913 patches 0 repliesSuperseded
  3. v2813 patches 2 repliesSuperseded
Earlier versions · 26
VersionPostedPatchesRepliesStatus
v2714 patches1 replySuperseded
v2615 patches5 repliesSuperseded
v2515 patches2 repliesSuperseded
v2415 patches2 repliesSuperseded
v2315 patches18 repliesSuperseded
v2215 patches1 replySuperseded
v2114 patches7 repliesSuperseded
v2014 patches1 replySuperseded
v1915 patches0 repliesSuperseded
v1815 patches0 repliesSuperseded
v1715 patches0 repliesSuperseded
v1615 patches8 repliesSuperseded
v1515 patches0 repliesSuperseded
v1415 patches0 repliesSuperseded
v1311 patches1 replySuperseded
v1214 patches1 replySuperseded
v119 patches1 replySuperseded
v1010 patches7 repliesSuperseded
v95 patches7 repliesSuperseded
v85 patches0 repliesSuperseded
v75 patches1 replySuperseded
v66 patches0 repliesSuperseded
v56 patches0 repliesSuperseded
v45 patches4 repliesSuperseded
v32 patches10 repliesSuperseded
v22 patches1 replySuperseded

Patches in v30 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13maintainers: add for log libraryMAINTAINERS+1 -00 replies
2/13windows: make getopt functions have const propertieslib/eal/windows/getopt.c lib/eal/windows/include/getopt.h+16 -150 replies
3/13windows: update os shimlib/eal/windows/include/rte_os_shim.h lib/log/log.c+15 -40 replies
4/13eal: make eal_log_level_parse commonlib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+41 -1160 replies
5/13eal: do not duplicate rte_init_alert() messageslib/eal/freebsd/eal.c lib/eal/linux/eal.c lib/eal/windows/eal.c+2 -50 replies
6/13eal: change rte_exit() output to match rte_log()lib/eal/common/eal_common_debug.c+2 -40 replies
7/13log: rework syslog handlingapp/test/test_eal_flags.c doc/guides/freebsd_gsg/freebsd_eal_parameters.rst doc/guides/prog_guide/env_abstraction_layer.rst +15 more+211 -2040 replies
8/13eal: initialize log before everything elselib/eal/freebsd/eal.c lib/eal/linux/eal.c lib/eal/windows/eal.c +1 more+31 -100 replies
9/13log: add hook for printing log messageslib/log/log.c+7 -10 replies
10/13log: add timestamp optionapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst lib/eal/common/eal_common_options.c +10 more+341 -60 replies
11/13log: add support for systemd journallib/log/log.c lib/log/log_internal.h lib/log/log_journal.c +4 more+203 -120 replies
12/13log: colorize log outputapp/test/test_eal_flags.c doc/guides/prog_guide/log_lib.rst lib/eal/common/eal_common_options.c +7 more+307 -40 replies
13/13doc: add release note about log librarydoc/guides/rel_notes/release_24_11.rst+20 -00 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchTyler RetzlaffMorten BrørupChengwen FengBruce RichardsonDmitry Kozlyuk
1/13A-b A-b A-b A-b
2/13A-b A-b A-b A-b A-b
3/13A-b A-b A-b A-b
4/13A-b A-b A-b
5/13A-b A-b A-b A-b
6/13A-b A-b A-b A-b
7/13A-b A-b A-b
8/13A-b A-b A-b A-b
9/13A-b A-b A-b
10/13A-b A-b
11/13A-b A-b
12/13A-b A-b A-b
13/13A-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 v30 thread

Cover letter [PATCH v30 00/13] 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 myself as maintainer for log because by now have added more than previous authors.

v30 - add isatty() to windows os shim
fix wording in release note etc.

Stephen Hemminger (13):
maintainers: add for log library
windows: make getopt functions have const properties
windows: update os shim
eal: make eal_log_level_parse common
eal: do not duplicate rte_init_alert() messages
eal: change rte_exit() output to match rte_log()
log: rework syslog handling
eal: initialize log before everything else
log: add hook for printing log messages
log: add timestamp option
log: add support for systemd journal
log: colorize log output
doc: add release note about log library

 MAINTAINERS                                   |   1 +
 app/test/test_eal_flags.c                     |  66 ++++-
 .../freebsd_gsg/freebsd_eal_parameters.rst    |  27 ++
 .../prog_guide/env_abstraction_layer.rst      |   6 +-
 doc/guides/prog_guide/log_lib.rst             |  60 ++++-
 doc/guides/rel_notes/release_24_11.rst        |  20 ++
 lib/eal/common/eal_common_debug.c             |   6 +-
 lib/eal/common/eal_common_options.c           | 122 +++++----
 lib/eal/common/eal_internal_cfg.h             |   1 -
 lib/eal/common/eal_options.h                  |   5 +
 lib/eal/freebsd/eal.c                         |  65 ++---
 lib/eal/linux/eal.c                           |  68 +----
 lib/eal/windows/eal.c                         |  50 +---
 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                                 |  83 ++++--
 lib/log/log_color.c                           | 214 ++++++++++++++++
 lib/log/log_freebsd.c                         |  12 -
 lib/log/log_internal.h                        |  22 +-
 lib/log/log_journal.c                         | 152 +++++++++++
 lib/log/log_linux.c                           |  61 -----
 lib/log/log_private.h                         |  53 ++++
 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, 1168 insertions(+), 352 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
Signature · 1 line
2.45.2