mbox series

[v31,00/12] Log library enhancements

Message ID 20241107205145.2424871-1-david.marchand@redhat.com (mailing list archive)
Headers
Series Log library enhancements |

Message

David Marchand Nov. 7, 2024, 8:51 p.m. UTC
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 after some small/cosmetic changes:

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,