From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 917D143D39; Sun, 24 Mar 2024 12:18:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AFB740289; Sun, 24 Mar 2024 12:18:42 +0100 (CET) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 6771A40281 for ; Sun, 24 Mar 2024 12:18:40 +0100 (CET) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id BDED25FF for ; Sun, 24 Mar 2024 12:18:39 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id B23E65FE; Sun, 24 Mar 2024 12:18:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.3 Received: from [192.168.1.59] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id EF3CE718; Sun, 24 Mar 2024 12:18:37 +0100 (CET) Message-ID: <4d463205-4f1c-4107-9b4a-df57f5778f4c@lysator.liu.se> Date: Sun, 24 Mar 2024 12:18:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 0/9] Logging unification and enhancements Content-Language: en-US To: Stephen Hemminger , dev@dpdk.org References: <20200814173441.23086-1-stephen@networkplumber.org> <20240324024109.306614-1-stephen@networkplumber.org> From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <20240324024109.306614-1-stephen@networkplumber.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2024-03-24 03:33, Stephen Hemminger wrote: > Improvements and unification of logging library (for 24.07 release). > 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. > > I find color helpful because 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. > > * Use of syslog on Linux is replaced by using journal > API (over unix domain socket). This replaces legacy syslog; > (almost) all Linux distros have switched to journal. > Is "switched to journal" the same as "switched to systemd", or are there non-systemd journal API implementations? I'm guessing there are quite a few Linux-based embedded systems that doesn't use systemd. Ideally, you would like to have journal as the Linux default, and then syslog as a build-time option. > Will add a release note in next release (after this is merged) > > v11 - rework to be portable to Windows > drop syslog support and support journal instead > > Stephen Hemminger (9): > windows: make getopt functions have const properties > 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: drop syslog support, and make code common > log: add hook for printing log messages > log: add timestamp option > log: add support for systemd journal > log: colorize log output > > app/test/test_eal_flags.c | 38 +- > doc/guides/linux_gsg/linux_eal_parameters.rst | 27 - > .../prog_guide/env_abstraction_layer.rst | 5 +- > doc/guides/prog_guide/log_lib.rst | 41 +- > lib/eal/common/eal_common_debug.c | 11 +- > lib/eal/common/eal_common_options.c | 123 ++--- > lib/eal/common/eal_internal_cfg.h | 2 +- > lib/eal/common/eal_options.h | 7 +- > lib/eal/freebsd/eal.c | 54 +- > lib/eal/linux/eal.c | 52 +- > lib/eal/unix/eal_debug.c | 3 +- > lib/eal/windows/eal.c | 39 +- > lib/eal/windows/getopt.c | 23 +- > lib/eal/windows/include/getopt.h | 8 +- > lib/log/log.c | 513 ++++++++++++++++-- > lib/log/log_freebsd.c | 12 - > lib/log/log_internal.h | 16 +- > lib/log/log_linux.c | 61 --- > lib/log/log_windows.c | 18 - > lib/log/meson.build | 5 +- > lib/log/version.map | 2 + > 21 files changed, 656 insertions(+), 404 deletions(-) > delete mode 100644 lib/log/log_freebsd.c > delete mode 100644 lib/log/log_linux.c > delete mode 100644 lib/log/log_windows.c >