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 8615543D36; Sun, 24 Mar 2024 03:41:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 50223402AD; Sun, 24 Mar 2024 03:41:21 +0100 (CET) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id 6D5C7402AB for ; Sun, 24 Mar 2024 03:41:20 +0100 (CET) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-789e209544eso208184385a.0 for ; Sat, 23 Mar 2024 19:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711248079; x=1711852879; 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=8Yzctj9+YmFt7CdPuC7vAdU7Qhbrkyt2HO+fY2Djryw=; b=EgtfMtNvitHZPx82b5O8jylThZwVTlCpdEzKiqVj3tUHZnwln/2ryQpq300Izdt5Q+ PsihhO2YxnUv9HbSO86f/x6zxHCa7MdDk4cQLK8RogMG6J0Lfke4x6CU0nQ+vkR1DmDw zLOOQU21TQWi/GLHkSFOeZpaI1ziPm1eFFT8Yebi7KnLAMyltVnP6FgnT4ccwCQVauyv Qd4wII2hjY6snGIp9FVOR5ukZ2ETvZDBGD2YCrdcaFN/FSASn+WSoCECA5EckvTJw25S t1NTF5Med/Pv8gseUf4KUkS8y3281uOeJbzcwYAadUV6ASSOjjnvPgXgNdQ90IAb3VhE Rr8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711248079; x=1711852879; 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=8Yzctj9+YmFt7CdPuC7vAdU7Qhbrkyt2HO+fY2Djryw=; b=uygHeR6E3Qk3+pdMMEuMs/FA7cHJrYezXX7zfQ5CQgYj55QC0vS+0eWLYioqy9VV1l yOvTqHFadNqrLUIJ1zhppbwRh8fKncaB1zsqnu/a/sBslyMxQEgjESZiaaANXn19FnKl pDNr943ZbM5lp68Ow5zgHaP157zQ8naOG/dniWDZoRvl/T9iepNvDkvS0vcbWT8YJpjA UvANbob1IieHknpRxPDPuflZMjXOqK56qp/HeeTfyVMA2E9pUu69mmoPGY8jWHcjFiJl 8vOEnfvdB/320L5uccVVDVtF725L1n6Vx63ZAKeDvggLAWhP/1WKIBIoLcI9S1ONlFvD cFVw== X-Gm-Message-State: AOJu0Yzc8GmxpeWAjkoy5rT8p3Sn1ecddup6/O6xO5bMpf430zdBtSXE 2zNVkvsJJGlKDD/kB19PPxs4cLXewcp+4gutkcxx7Y4oUZgoIw1e2FsA7LflV8nFktsZisXSXO6 s X-Google-Smtp-Source: AGHT+IGV1R4naA20d7LmrvAnFSq88px+5fIEnD/y3Fp88qIQgzCIPt87S/fW6uJrQdY1cnLEIhKVKw== X-Received: by 2002:a05:620a:c0a:b0:789:c645:4e0 with SMTP id l10-20020a05620a0c0a00b00789c64504e0mr3328423qki.45.1711248079574; Sat, 23 Mar 2024 19:41:19 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id q17-20020a17090311d100b001dc3c4e7a12sm2244980plh.14.2024.03.23.19.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 19:41:19 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v11 0/9] Logging unification and enhancements Date: Sat, 23 Mar 2024 19:33:22 -0700 Message-ID: <20240324024109.306614-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. * 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. 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 -- 2.43.0