From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id EAE3143D5A;
	Tue, 26 Mar 2024 18:36:05 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 6DE41402DA;
	Tue, 26 Mar 2024 18:36:05 +0100 (CET)
Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com
 [209.85.215.179])
 by mails.dpdk.org (Postfix) with ESMTP id C93A54029F
 for <dev@dpdk.org>; Tue, 26 Mar 2024 18:36:03 +0100 (CET)
Received: by mail-pg1-f179.google.com with SMTP id
 41be03b00d2f7-5ce2aada130so4158278a12.1
 for <dev@dpdk.org>; Tue, 26 Mar 2024 10:36:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711474563;
 x=1712079363; 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=BiuGI4YSX8hIF8IYk0/MoItLhscOgCESQQYHil5NK7c=;
 b=aJKWmXQX+X23hv6HRHfDqPjxvD2MZPyZ0aNjDji33T0CcB5X8HICHE/7+L0I9H0WPN
 4t2KzM0iRF15oppZF/lBdfc0NGED5xJChHAApI4AXSwDtSQdz/gbiHnRaJPmJJ7LXJvu
 5aR0B1JPPnj3F24FF8EAUAh2ClUCuTRPZNB74smO4iX5yhprkdO1REQaxZPQuYPQJTGD
 hz3kX/dn5oRyCVXmfiKz1uA6TwkMcR/l0gud5dtOy/mT2UhgkleYupYq4+eBkcPp+5Hf
 Nvz2VUsKhTAWhBhOXqSgFbet21RivR7+LE/uG2TwOw9zX3J+S5MAQvvCvDivWxQbRbk9
 B+wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1711474563; x=1712079363;
 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=BiuGI4YSX8hIF8IYk0/MoItLhscOgCESQQYHil5NK7c=;
 b=DwVwD5PUIbrCOb4HBUkv5O9eGaANM9e94mGhjPWH2Fv/9yUxbcjvaDo3PQ/fjLWS++
 MknWlPTYT0rRsJUnbD7pf2RgKaEFDLVIF2/ePgRB6dRQzQk+p0jZ3xmyrbMVVPzgmzE+
 xQVHRmKBkUzLwBBPMPK85RN9y33dzu8ivuUzYJcd7qvNTusk7Xe1lH+jH9rVULv9Mhgd
 Dd27RhIh/cr3nKj0nZEGpxSlNXJITs5nMtNn981IC+bLek/9HqRLHMeIJO7AMeCxE/c7
 GIFv+cQB3rjCg8RMzh9A0HKrU3UvqG65730kS02nq4mzownf0u43ze40zojc3neQKUtq
 zp5Q==
X-Gm-Message-State: AOJu0YymqHiVgmhgOBoZahmttDMbjTnWAaCQOBZBAeu+aYArln00CzEy
 8pkBbySaG4LySAzNzaL/VS7G9XRBQ3B4LaHB8Y9j0mNNJ4FnkvlUgeOKu5aHAz7Rv6AxWCVaKDz
 N
X-Google-Smtp-Source: AGHT+IGibdDnlwnKfcbd/V4/XeK5EQpYWCkts/AePBz+jKdnJ4ts8cLRpQU5GvGvC2JNPw9QmIgVmQ==
X-Received: by 2002:a05:6a21:999f:b0:1a3:42ea:cbed with SMTP id
 ve31-20020a056a21999f00b001a342eacbedmr3891467pzb.44.1711474562649; 
 Tue, 26 Mar 2024 10:36:02 -0700 (PDT)
Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203])
 by smtp.gmail.com with ESMTPSA id
 u6-20020aa78386000000b006e58da8bb6asm6205546pfm.132.2024.03.26.10.36.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 26 Mar 2024 10:36:01 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v14 00/15] Logging unification and improvments
Date: Tue, 26 Mar 2024 10:34:20 -0700
Message-ID: <20240326173552.97249-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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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)

v14 - fix Windows build, by having common asprintf shim
      fix asprintf memory leaks
      add log stream when using journal

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             |  10 +-
 lib/eal/common/eal_common_options.c           | 117 ++--
 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         |  56 ++
 lib/log/log.c                                 | 633 +++++++++++++++++-
 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, 942 insertions(+), 428 deletions(-)
 delete mode 100644 lib/log/log_linux.c
 delete mode 100644 lib/log/log_windows.c

-- 
2.43.0