From patchwork Thu Jun 29 15:58:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 129118 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29B8242D8D; Thu, 29 Jun 2023 17:59:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BC3840EDB; Thu, 29 Jun 2023 17:59:18 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 4E6D7406B7 for ; Thu, 29 Jun 2023 17:59:16 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-55b12286476so524866a12.1 for ; Thu, 29 Jun 2023 08:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688054355; x=1690646355; 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=gldaf5L16atZRYBtDOr23qz9qF1emlv/WUYosVj3+JQ=; b=ko4naj83tJv9TVliIH2MC3o4bpwLmDQDGMJxH0EZFGcWsc2oc+roBrRTztQr8a2wpG l6A1KUcLiN6y+4A5q6IffdGSLkdaXO2NcVv1+0wpIZPv6N25R4Ue/wNiPIcfwI5M84a0 St2WcXbjSh3211/X8MMRaXYVZ8Cm6HbDY+oB8/3m/rHj98HUcTRASp0fjXiP1vOsApPu IdPq3ItnfsdXDUOTkeR4kqZzm524HmrF66SOgwzF12mHICLF2x667d/OPMbjrDE3JyO3 SGw2o4G5vlH41cTagOo16L308xrsp88NIH5hwYFz3N1WEcF/+VNTo+xzZxVlFRYSahyG eESA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688054355; x=1690646355; 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=gldaf5L16atZRYBtDOr23qz9qF1emlv/WUYosVj3+JQ=; b=EUMwxl4qhOgfZlAzxoEUFtJ2VJvNMFHsTIvJnuINJqzEVV+3/eXsqm5iuTq6tHO4gT CtbaB9JDOKLzOcxwaMsd3VmI2OdsMBDrth2AzIHoe6BrhvK4xPa2+wImrqKX3fhsXGhJ aR8BikuB4tHMogCrTjEjUuZe8xGE60SloB6LHd1CgT4iKScz3dR6JWwKDdLuFcf/Ujr+ Kp5tbUOlUjr4s+fr3DK/sTFv1G8eWpPLs0yqPyzE36KIWAIUWy4+oj+u85vA5fXr3Gvl kMZacOwtSBHauPuKF1Go/AW075vbAqV67P6CWj2bV4ZU6gJyeQY6wnUFCCD+ZPkjP8PN /A2A== X-Gm-Message-State: AC+VfDz8dcH/2HHoOW+hVZs2KCmA09ESXP7zp3nSHt/HaL1XfqxUQKeD 3CYsuW8rl9hgeCkvlLh22ER2MXys4zX3631heeZVkQ== X-Google-Smtp-Source: ACHHUZ6gF1CZ+HahRo1EvT3+ESbXh5olMSVWgHGnuuM1A50GX0p6o9zDkOP0fe04FBWMzfPCHdNBQg== X-Received: by 2002:a05:6a20:488:b0:103:d538:5ea6 with SMTP id 8-20020a056a20048800b00103d5385ea6mr13626pzc.48.1688054355150; Thu, 29 Jun 2023 08:59:15 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id c6-20020a63ea06000000b0055b553157a5sm471716pgi.71.2023.06.29.08.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 08:59:14 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v6 0/6] Logging related patches Date: Thu, 29 Jun 2023 08:58:37 -0700 Message-Id: <20230629155858.75668-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20200814173441.23086-1-stephen@networkplumber.org> References: <20200814173441.23086-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Patchset that includes: - unified code for more of log argument handling - fix for duplicate option errors - timestamp option for logging v6 - fix build on freebsd and windows - add test for log timestamp Stephen Hemminger (6): eal: unify logging code eal: turn off getopt_long error message during eal_log_level eal: fix help message for syslog option eal: skip stdio on console logging eal: allow user to set default log stream before init eal: add option to put timestamp on console output app/dumpcap/main.c | 3 + app/pdump/main.c | 3 + app/proc-info/main.c | 3 + app/test/test_eal_flags.c | 9 ++ .../freebsd_gsg/freebsd_eal_parameters.rst | 32 +++++ doc/guides/linux_gsg/linux_eal_parameters.rst | 5 + lib/eal/common/eal_common_log.c | 55 +++++++++ lib/eal/common/eal_common_options.c | 8 +- lib/eal/common/eal_internal_cfg.h | 3 + lib/eal/common/eal_log.h | 6 + lib/eal/common/eal_options.h | 2 + lib/eal/freebsd/eal.c | 55 ++------- lib/eal/linux/eal.c | 46 +------- lib/eal/linux/eal_log.c | 61 ---------- lib/eal/linux/meson.build | 1 - lib/eal/unix/eal_log.c | 111 ++++++++++++++++++ lib/eal/unix/meson.build | 1 + lib/eal/windows/eal.c | 36 +----- 18 files changed, 259 insertions(+), 181 deletions(-) delete mode 100644 lib/eal/linux/eal_log.c create mode 100644 lib/eal/unix/eal_log.c