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 B64E2459D7; Thu, 19 Sep 2024 17:06:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F4E640A7D; Thu, 19 Sep 2024 17:06:21 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 1026D406FF for ; Thu, 19 Sep 2024 17:06:19 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-7191f58054aso854511b3a.0 for ; Thu, 19 Sep 2024 08:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726758379; x=1727363179; 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=FIgZFi46hwqMzMfdei9SuXBeOF/OZju7sfY1Kjb3x8E=; b=RLkSXv3qFdHBU4Sc4xZ7aUGLDq5or3XxEjwvoLiJnUsl92TvTR1eatcoUCoRYI0eJM iyWBsxpjEyGWyrgs0O8gqWuE2YdaorD6WAsyp6pRxIKElqnX5G5myDDemMg+x96Dc6h7 xvBUpYxgit9OjkU8ApmxoMEQY70fD9Sn6MBe2r2n3bfBpi2jmFFJuiDmo85diXXKezpf fyZjBOrAUMcdE1Sd2ymz0k5ZtxwVYyIdOswKzaD48exQrFPjd/pcjkPjQRkU8AwkmImb heQgFs35dCHn/5eftkzHKmZB4NpF1Moz3DdGZrcI0QXXONIMizXt1v3Afv4WA7BfyIuw ZMWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726758379; x=1727363179; 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=FIgZFi46hwqMzMfdei9SuXBeOF/OZju7sfY1Kjb3x8E=; b=U84Yhrftsejlz0mGyYELOaoSup6w1Dd5w+cDrlyo47zN4mK9p10muiW4VutewfOfmo XMZn262tIZ04nQZrfvDY/x8go70soBQWrMf6aC27q27lh3qudqXo8+5YJlU1Zs8X2hJX xF04xIKHQ05yC+8RFgyM1mZ8AlPjJ6/A9ULKh9FIqB+oCO6+9C4E+kSCXqmAuLMHYyS0 zIw7WcpvBJLUMR+b3RtvSnYsSAgj4jLGc89hb02zSTCvuXpwiEQUEmmLjHvGxAuuBF00 7prnU2SkJGcgZI82zZIOvgQUMNyTIJ58pqNNi7k5caRUeZGWPP7ikt2ICSUHdr9WvtLO D3aQ== X-Gm-Message-State: AOJu0YwH+o1oa2uKsRzsRknBatb+3kzkGmU9o5QOOcpv6tVI0VoQth5J bFYEykXjYkNONn9G1JxHZYuZVzzODLvV1AqQAneZfbnlaQnx3yB/1pCCoAF6b5WomZq2iWS5wU4 b X-Google-Smtp-Source: AGHT+IEt9tdvLkaGIceAMyQIXlpA9d2/m7zQkumLO6cWhwIFdsW6Je0V7Sd1RjwXmA/A28+tf8z6kQ== X-Received: by 2002:a05:6a00:66c4:b0:70d:3777:da8b with SMTP id d2e1a72fcca58-71926203935mr32047626b3a.25.1726758378845; Thu, 19 Sep 2024 08:06:18 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71944adfd3dsm8620841b3a.92.2024.09.19.08.06.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 08:06:18 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v25 00/15] Logging enhancements for 24.11 Date: Thu, 19 Sep 2024 08:04:06 -0700 Message-ID: <20240919150609.5281-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20200814173441.23086-1-stephen@networkplumber.org> References: <20200814173441.23086-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 mprovements 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. v25 - make the delta and relative time stamp formats thread safe. Use atomic 64 bit value (nanoseconds) and convert to timespec. 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 MAINTAINERS | 1 + app/test/test_eal_flags.c | 64 ++++- doc/guides/linux_gsg/linux_eal_parameters.rst | 27 -- doc/guides/prog_guide/log_lib.rst | 72 ++++++ doc/guides/rel_notes/release_24_11.rst | 27 ++ lib/eal/common/eal_common_debug.c | 6 +- lib/eal/common/eal_common_options.c | 135 ++++++---- lib/eal/common/eal_internal_cfg.h | 1 - lib/eal/common/eal_options.h | 7 + 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 | 71 ++++-- lib/log/log_color.c | 148 +++++++++++ lib/log/log_freebsd.c | 12 - lib/log/log_internal.h | 28 +- lib/log/log_journal.c | 200 +++++++++++++++ lib/log/log_linux.c | 61 ----- lib/log/log_private.h | 61 +++++ lib/log/log_syslog.c | 88 +++++++ lib/log/log_timestamp.c | 240 ++++++++++++++++++ lib/log/log_windows.c | 18 -- lib/log/meson.build | 12 +- lib/log/version.map | 5 +- 27 files changed, 1129 insertions(+), 377 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 -- 2.45.2