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 0AEB343D5B; Thu, 28 Mar 2024 00:30:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBDC5402CE; Thu, 28 Mar 2024 00:30:12 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 6C878402AC for ; Thu, 28 Mar 2024 00:30:11 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e0511a4383so3571105ad.2 for ; Wed, 27 Mar 2024 16:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711582210; x=1712187010; 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=618hk8RGFQUB8hkuSoAH+6x9bhXRrkFcL4CTgp+Ku0I=; b=teEDmc3ryt74Vie6RLOKQMTM8Yd1wC5gni/cpFLKE6UtpijhSe76S1ZMJ3t4LlA1ay WIBxl0GypQol6h51uYhaq7dfLaZdo8KvaFzq74VCemxA+5WYMcczeV9QIPrUwPKTszUe PwxYcdmZzUGGjDQ6DFC2Bx7mw3njWqjwZKq8U375qDAFHEH+jiEDM2jOXlLX8+pTZmVd SQJ/mXV598XRKdpJ8CDQAC4AMLLEifyhkDsKdnpLewWGIKwi2mXvHO2peSzZ+nDf4S6K z28HyYr4RnO8zzNzrjlZ0P5nuTji3OXkTFXN22MEevhM/NUbbk7sJ8jJJAWDy8aT+lHx +asA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711582210; x=1712187010; 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=618hk8RGFQUB8hkuSoAH+6x9bhXRrkFcL4CTgp+Ku0I=; b=Y3zbzHbdqI27cvqxfj9lvjgsM5v+wPk6UdFFtg5JD4PzctITAszLZ9xr5TCtRI8o/T 0YfjQyZmUGdLNGDlY7tOXG31QbWpV14NgJ+4DtA1Ds9B24XVFLAdKwhZeaCYdVGF8enw A+sWsXHPuZqMogcLOUMbKWMLiFeMfAJpOnRaVF4J5bA6hF4c6W9/1Usr0Pe5+QES6gAl TNsAlw+c7ulS+bYjDXddZdGu06scPPZrmz1DqzlChYp/YhN9wLrZxoptYVuMW77Rz5Hn TAyvh7ZD/FFk/ph6EPoyN4tbs0HB2ZCRhAjgiyAHOAYs8oOrvQkKseedGZ7e/zkGlAlM +mZg== X-Gm-Message-State: AOJu0YzC/GiMydo1BnxgoHH2U55AL/cSRVZWzCKSaRgFKnsK2AqXAWcx ejwxwaPHyJuXOVTynFw3EOUcaj7EdTiqXLDB619gGFbpPGxQsZvKP+wzr5XhSEJnk8cJJx0lHak N X-Google-Smtp-Source: AGHT+IGIOO2yZOGcjVxa6AVq+LV5lO/XWq8cul36H7cp2vSYw4U6LLpbA2recqZsKxo5v4v8mYpEoQ== X-Received: by 2002:a17:902:7c92:b0:1e0:c486:9ae9 with SMTP id y18-20020a1709027c9200b001e0c4869ae9mr1121842pll.64.1711582210487; Wed, 27 Mar 2024 16:30:10 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id n15-20020a170902e54f00b001e0fdc6e4ebsm80772plf.175.2024.03.27.16.30.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 16:30:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v17 00/15] Logging unification and improvements Date: Wed, 27 Mar 2024 16:28:23 -0700 Message-ID: <20240327233001.83505-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) v17 - fix isatty incompatability on Windows Stephen Hemminger (15): maintainers: add for log library windows: make getopt functions have const properties windows: add os shim for localtime_r windows: common wrapper for vasprintf and asprintf 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 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 | 57 ++ drivers/bus/pci/pci_common.c | 32 - lib/eal/common/eal_common_debug.c | 11 +- lib/eal/common/eal_common_options.c | 126 ++-- lib/eal/common/eal_options.h | 5 + lib/eal/common/eal_private.h | 10 - lib/eal/freebsd/eal.c | 64 +- lib/eal/linux/eal.c | 68 +- lib/eal/windows/eal.c | 77 +-- lib/eal/windows/getopt.c | 23 +- lib/eal/windows/include/getopt.h | 8 +- lib/eal/windows/include/rte_os_shim.h | 58 ++ lib/log/log.c | 651 +++++++++++++++++- lib/log/log_freebsd.c | 5 +- lib/log/log_internal.h | 25 +- lib/log/log_linux.c | 61 -- lib/log/log_windows.c | 18 - lib/log/meson.build | 5 +- lib/log/version.map | 4 +- 22 files changed, 972 insertions(+), 428 deletions(-) delete mode 100644 lib/log/log_linux.c delete mode 100644 lib/log/log_windows.c -- 2.43.0