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 CDCC843D49; Mon, 25 Mar 2024 21:54:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 450F740695; Mon, 25 Mar 2024 21:54:18 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id D493040298 for ; Mon, 25 Mar 2024 21:54:16 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6ea8a0d1a05so1834201b3a.1 for ; Mon, 25 Mar 2024 13:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711400056; x=1712004856; 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=xh0EOvH/ORSyyWSunR0jLotZq6gnJ4q/s4iUu82+Tug=; b=bvRTFs9z9lQpHlycmKEiCSEKPjz5zEfyFbnazJiRrvXvBamIGM5xHCTIOGwQrOdQZe Bpoh7i8vBlwQwlFY3syKHsiIvECoFzIgmnnlJEFfW4xjVgMIKj9KbkKUYeQVbfCThyXz QrWa8YybJMysHA/PFmhsJbHYZOPWsAGbUNdvwLpzzpsSpiYp/Dn3BB39plp/7MKP12wp zAaInYwhgl9sdZmQ9+R/Cv53as88kwF+zQrLIXC27b2lRFruyQS4pusU6Ur8vfBTAa5Z FX9SPmqNP//9ISidkloAdFguPRW0W5wmzT2utGjoCBkLJ+q2FIQJU3LwVC/Adg3LG8Uv GnwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711400056; x=1712004856; 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=xh0EOvH/ORSyyWSunR0jLotZq6gnJ4q/s4iUu82+Tug=; b=TCYEAbIUTOvlSafanw0u95U4AeSqv/BHebSlfA1LjxzcAYqjj3u4z99sacure6dPo8 ogxZ2+flkEY0lQOeZaI5h7J/8OzuE3nwOrcaF3oXkHEtVdpOa5pdJ2AGH9RmA1RXiSii S8V6C/XwkUq93iBfa1N+yp92L2rvLErIcYY53oKveKmfyPNDVXXRUMXngYXzrzklmBf8 2jvdNgW3x5C16k5IxWNGmX1JaNETfOLnd61aL9lCWR2asjm3oJWmvrJP8O8KyyPPJ52C tvm7vujgLOwy80bGckp3BAmaG/TgubiMHV0RHFuj4+vannlLzKQXFPNZeDK36ypG55gd 8wKA== X-Gm-Message-State: AOJu0YxC6cmQVb3uqZL9RKUitRSUGcJkQh0Nnk1XhkiT5IQthrzDyWQa QSvAPt/qePOr1kqPgP8irQpIpFTFTwLn8hyyOfAlMyFrZVbI9iDCIcVKPxVIMbHSoOeXkbsHeqa d X-Google-Smtp-Source: AGHT+IEZWlYr8X0xEVWFiECgg6B/l9uWf6g+wEownL8EQaX3uujxtW1Y13NCm2YKv6CxsWhEdCJUgA== X-Received: by 2002:a17:903:18a:b0:1e0:e011:e3cb with SMTP id z10-20020a170903018a00b001e0e011e3cbmr1733512plg.15.1711400055747; Mon, 25 Mar 2024 13:54:15 -0700 (PDT) Received: from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203]) by smtp.gmail.com with ESMTPSA id b18-20020a170903229200b001e0b5eee802sm3164487plh.123.2024.03.25.13.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 13:54:15 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v12 00/14] Logging unification and enhancements Date: Mon, 25 Mar 2024 13:46:57 -0700 Message-ID: <20240325205405.669897-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) 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 (14): 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 maintainers: add for log library MAINTAINERS | 1 + app/test/test_eal_flags.c | 17 + doc/guides/linux_gsg/linux_eal_parameters.rst | 27 - doc/guides/prog_guide/log_lib.rst | 57 ++ lib/eal/common/eal_common_debug.c | 11 +- lib/eal/common/eal_common_options.c | 114 ++-- lib/eal/common/eal_options.h | 5 + lib/eal/freebsd/eal.c | 60 +- lib/eal/linux/eal.c | 64 +- lib/eal/windows/eal.c | 44 +- 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 | 594 +++++++++++++++++- 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 +- 20 files changed, 803 insertions(+), 350 deletions(-) delete mode 100644 lib/log/log_linux.c delete mode 100644 lib/log/log_windows.c -- 2.43.0