[PATCH v23 00/15] Logging improvements
Bruce Richardson
bruce.richardson at intel.com
Wed Sep 18 10:27:22 CEST 2024
On Tue, Sep 17, 2024 at 09:56:05PM -0700, Stephen Hemminger wrote:
> 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
> syslog if output is going to a terminal.
>
> Add myself as maintainer for log because by now have added
> more than previous authors.
>
> v23 - simplify and fix Windows and FreeBSD builds; fix #ifdefs.
> Change from defining stubs to using inline functions in log_private.h.
>
> Stephen Hemminger (15):
> maintainers: add for log library
> windows: make getopt functions have const properties
> windows: add os shim for localtime_r
> 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: move handling of syslog facility out of eal
> eal: initialize log before everything else
> log: drop syslog support, and make code common
> log: add hook for printing log messages
> log: add timestamp option
> log: add optional support of syslog
> log: add support for systemd journal
> log: colorize log output
> doc: add release note about log library
>
Thanks for the cleanup.
Series-acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list