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 660ACA0524; Fri, 5 Feb 2021 17:13:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32A73188A25; Fri, 5 Feb 2021 17:13:10 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 9F8FB4067B for ; Fri, 5 Feb 2021 13:23:36 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id x23so2711069pfn.6 for ; Fri, 05 Feb 2021 04:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hSQdH64y7s741cm7wK4wzevSD4QJA6PawGkfmIyJWFk=; b=JS6l2QUCrL4j/xTImLQWXMm1fKij8yG0o0hyiyw7/1V9xLcpOJIerj0DbysKGqymSV +3ZOYVykwa3uf1AIflPTnnDLCFPk2hNTqMhobvw0BWntKgIxC+CrxHYHNLz1RhUrtd/J mnDx4OWxRSLMmE/opzZywSy9ywzTuI5Wuw1WTEKZHvfZjXOd0Jb40ThX9vsP65VmT0HL kJVbX69JOTRcZk9fTHPyRGv4MFECcbJ9mdialWs9SMGfIA/sIWqM0bHs5qJlRDlllFbW cQgbHbfF9P402H9bN5ZdaQdFuWbMc0ZUdAzNM+ohqd4pUcjRHHVUjVi/4SvD4KIMXgTI OpIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hSQdH64y7s741cm7wK4wzevSD4QJA6PawGkfmIyJWFk=; b=G2vVKEJ1Hxhp1Z2SHP1bPCay15zbWBTMB4c0h5W74epwRBnMrApICl0uZOY6xm1N1v K+qQ6jL8yxjNpcEIOFPlst55GVHlXkpLkbzJtmkvCfL5RRVLvdN+4LwG8tcRDbegXTGf EjoVCgoXC6s7Qm76I/w7vJk2wAFrgmQ5KiRelN+ZIJlWT+0bG3JIYStnzKrH6p0W9/Tg oGJsuqjvZLaQm3EyLC82R5Len2KZAWRsJO7nreFZC3dD2ZyR0I5Q6z9NoVqkclkZx2tu MyVrhGpnXzrF9AS8TYsRYrjQSLsak4VdGIhaxjlJu6UMeR7+Mvrjv0Y7HxIDcycX0pKM YMpw== X-Gm-Message-State: AOAM533VYVQIHB/wXOgrbUxtggkdzhkw43Lg2TyTdY60gz4cm+TnC5Fo OyhcwVDMekX76+wx3FNvKVsy2ruIdUK3vrzMq18= X-Google-Smtp-Source: ABdhPJzNHhUAykEBwc9WnvAa4liSPxwtx14uDh6R7VPLFG5uncZyVI3x9CL3Vl0/WZ0sLdDcuLXhPhPdUqVusCKk6vM= X-Received: by 2002:a63:e101:: with SMTP id z1mr4107088pgh.190.1612527815676; Fri, 05 Feb 2021 04:23:35 -0800 (PST) MIME-Version: 1.0 References: <20210205112433.1681853-1-fengli@smartx.com> In-Reply-To: From: Feng Li Date: Fri, 5 Feb 2021 20:22:36 +0800 Message-ID: To: David Marchand Cc: Li Feng , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Fri, 05 Feb 2021 17:13:08 +0100 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" David Marchand =E4=BA=8E2021=E5=B9=B42=E6=9C=88= 5=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: > > > > 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. > > Why not use rte_openlog_stream() / rte_log_get_stream() ? > > > -- > David Marchand > 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. Use a custom logger function may be a better choice.