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 0F0E2A0524; Fri, 5 Feb 2021 17:39:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8464640682; Fri, 5 Feb 2021 17:39:27 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 27B4E4067B for ; Fri, 5 Feb 2021 17:39:26 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id fa16so3490926pjb.1 for ; Fri, 05 Feb 2021 08:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RpwKTykMwo3gBrHs7zdjEAtgVx/eHtOLHe+mZJhfu3c=; b=if22OyH943+Fsig5tThEtM/VpRm/ZqD0eWClPQthRUwpzQC5+jJldMzr77trJb8HWG 0SbSOAEjYsFWF6CSqpe0MHEHVOtk2uVvw2rU/pLzeaRGPOhG+rGCI0xLFyc18z3zjUtE HoIwvJ8jfJqcVBqydI02R7OJlHqzTtxLmc7n1TpjvuJ20w3kxG9sgPsgg2JDozZHxLoT FJhIdFfl/S+/bOExbJxpL0cHqV905AGciGnxoZMHA/+GOCFbVmmEXCXxHik4AI/8Ain/ Kcjf+IUKHCWqXTKnBCqVtpQdo3vSqiLXtb25MwoL1SFjaMsSvmy5vyZ6XUzR0l2z6Zd1 oCnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RpwKTykMwo3gBrHs7zdjEAtgVx/eHtOLHe+mZJhfu3c=; b=TMLEmHr+VEqf7K9quYh5hGLMT1A0lydg9/HDbhTeThiN29uy0HJmXWjkg+UX0uZogK ZDIr35N3ul1+rgNBJm7W/Yty7KMZg6ITCgRD/KYTO/Yn/AtcIOX0nRurLAL6Df8DLXdG J6TtpXbaMdZ0u0IFCXl4HuBKiHLOPSuIFh2+3w2RNYpNMCW4+/KoiiEd6oBP+kvoOtCr Argb/CKP4s0wnce5B+YIN+kZATnalA1uNIf47HasxLvlQmihUPiHIFgs8P8ojzZW6NJv A+R9/M1m8n+sQs3iP4MbDObqf6d0rFb85xcY7iHPQIJroV86jjAhOhBrXzqQXY3IcnDM N6Hg== X-Gm-Message-State: AOAM531bXHe3OoAZb/3HDM2uZc1/nAZ2EnN1GRTWG3z+GhbtIcmdAqiS mkiV0JczBFQ5zaUO1mjv7oaeSA== X-Google-Smtp-Source: ABdhPJzvBxhicWxYGxNOXviYylgvDrXmxNox7gQQ//kT/JWJ+yxXSGgsqc2zgLkO/pvrUJXQLuPU2w== X-Received: by 2002:a17:902:201:b029:e1:20bc:74ca with SMTP id 1-20020a1709020201b02900e120bc74camr4804793plc.31.1612543165372; Fri, 05 Feb 2021 08:39:25 -0800 (PST) Received: from hermes.local (76-14-222-244.or.wavecable.com. [76.14.222.244]) by smtp.gmail.com with ESMTPSA id q1sm400123pgr.58.2021.02.05.08.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 08:39:25 -0800 (PST) Date: Fri, 5 Feb 2021 08:39:18 -0800 From: Stephen Hemminger To: Feng Li Cc: David Marchand , Li Feng , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , dev Message-ID: <20210205083918.3f67e8f3@hermes.local> In-Reply-To: References: <20210205112433.1681853-1-fengli@smartx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] log: support custom log function 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 Sender: "dev" On Fri, 5 Feb 2021 20:22:36 +0800 Feng Li wrote: > David Marchand =E4=BA=8E2021=E5=B9=B42=E6=9C= =885=E6=97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=887:56=E5=86=99=E9=81=93=EF= =BC=9A > > > > On Fri, Feb 5, 2021 at 12:25 PM Li Feng wrote: =20 > > > > > > Currently, the dpdk log is out to stdout/stderr and syslog. > > > We should support to output the log to another please, e.g. file or > > > glog. =20 > > > > Why not use rte_openlog_stream() / rte_log_get_stream() ? > > > > > > -- > > David Marchand > > =20 > rte_openlog_stream seems it could set an external FILE* stream. > However, in the glog or C++ io stream, it's stream like std::cout. > I think it's hard to use a FILE* stream to unify them. >=20 > Use a custom logger function may be a better choice. A FILE * stream can be created that uses any other function under the covers. See fopencookie(3)