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 3BA7943D4E; Tue, 26 Mar 2024 02:58:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DB97402C0; Tue, 26 Mar 2024 02:58:40 +0100 (CET) Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) by mails.dpdk.org (Postfix) with ESMTP id D9EE3402B5 for ; Tue, 26 Mar 2024 02:58:38 +0100 (CET) Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dcbd1d4904dso5092084276.3 for ; Mon, 25 Mar 2024 18:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711418318; x=1712023118; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w3dkQK8zPGArwjO0l4EkaI5bRdYJcvDQvskjuKwYJwM=; b=zB9sIkxdzonOTzfQ7SORp/n++mp2OZ0R5BjVwvX0Hp05uoIs2mLqGuOw8PkBLk1hDl D6Mj9m1dwOI8SeNEhmrhXEBRqkxDQIG8y+9tu88jZs1XQzLcvag2y+PicRK/uFPj/ZMk 3mjKB2GTEpIc/AepRRbeyY8UqRAIjL9l/RhV1u949gGBwtVQ58O4WkH8wxaqLyxpfKp/ L+UBywHGirFJxbGlHKlnYBNcag/NBhLAGxoBZRHpdGEkBZMl4tEZ9RJaLDnlnZqWnIvU Sd2ZgxFo4OU8puJt9hJ3DBA5cqR23aU8i0bPZ/HXHXVgGd/vj1dksh/QOysYgB8L7crk Fg7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711418318; x=1712023118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w3dkQK8zPGArwjO0l4EkaI5bRdYJcvDQvskjuKwYJwM=; b=HiZxhzcsjV/cIRxShMLG3V/AqW7icxsUKJXfS3L4os/6owuV+4Tg1EcPP3Kz8DIE6f 8fY1e/0NX+m8QWICOaEDNDott/XOJZGiSY4CJBHIQI7u10rESERtuhUrs9Zs9c2xMBXn 9sJ/VpBw5r8gYdGkU6Zs8+WLXyPh52YYlJDgi8hytbnVY2h0LIxPFBGkLUb6+0i9nIIE XY3BSnI2/ZAQQ3CY3yReRVF3DcWnVntXezUC7k4/mYp6svP4ZJhwd8ZPwFXO7p18puck t8juH/DZ0FMLrOkx7N8xBgcTwJWzv5gfkPqh9f0TzLKUNIQgpnBocFcJs8tHqSYDc7s9 eH2w== X-Gm-Message-State: AOJu0YwmYaSzlKjWKqcsck1us21xUopivDHt9XPGWMxjl15+MVZU5bIf wAFMWuSojS3JGNthCyUHrp+gSWRoST0LStnRg1Qx64vyzdrYrgidH/lRIKCr6+EoYpO/bJ9ke1q V X-Google-Smtp-Source: AGHT+IFzAdwka46U6kCmeoFLIDNzR5WqfMb8yeYs5hZ++jnBPIAFbFQzBfaro+xfkw5PRahW6bTEwA== X-Received: by 2002:a25:dcd2:0:b0:dcc:693e:b396 with SMTP id y201-20020a25dcd2000000b00dcc693eb396mr6576256ybe.2.1711418317955; Mon, 25 Mar 2024 18:58:37 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id u19-20020a63d353000000b005dc88b232a5sm6571541pgi.26.2024.03.25.18.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 18:58:37 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v13 00/11] Logging unification and improvements Date: Mon, 25 Mar 2024 18:56:55 -0700 Message-ID: <20240326015827.825648-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20200814173441.23086-1-stephen@networkplumber.org> References: <20200814173441.23086-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. * 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. Add myself as maintainer for log because by now have added more than previous authors... Will add a release note in next release (after this is merged) v13 - fix functional tests and warnings about unused result v12 - add back syslog but make it optional. better shims for windows (thread safe) split out more of the eal core bits fix build warnings on FreeBSD and Ubuntu Stephen Hemminger (11): 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 app/test/test_eal_flags.c | 40 ++- doc/guides/linux_gsg/linux_eal_parameters.rst | 27 -- doc/guides/prog_guide/log_lib.rst | 43 +++ lib/eal/common/eal_common_debug.c | 10 +- lib/eal/common/eal_common_options.c | 116 ++++--- lib/eal/common/eal_options.h | 3 + lib/eal/freebsd/eal.c | 64 +--- lib/eal/linux/eal.c | 68 +--- lib/eal/windows/eal.c | 49 +-- lib/eal/windows/getopt.c | 23 +- lib/eal/windows/include/getopt.h | 8 +- lib/eal/windows/include/rte_os_shim.h | 10 + lib/log/log.c | 320 +++++++++++++++++- lib/log/log_freebsd.c | 5 +- lib/log/log_internal.h | 20 +- lib/log/log_linux.c | 61 ---- lib/log/log_windows.c | 18 - lib/log/meson.build | 5 +- lib/log/version.map | 3 +- 19 files changed, 533 insertions(+), 360 deletions(-) delete mode 100644 lib/log/log_linux.c delete mode 100644 lib/log/log_windows.c -- 2.43.0