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 8E90E42CC8; Thu, 15 Jun 2023 18:12:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6254040EE3; Thu, 15 Jun 2023 18:12:28 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id EAD4040E0F for ; Thu, 15 Jun 2023 18:12:26 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1b3db8f3d94so27009405ad.1 for ; Thu, 15 Jun 2023 09:12:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1686845546; x=1689437546; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ipGWMpKeO73jNejXxgrLcxYtub8woVobANhxBUz4FP8=; b=22ZN6xo/Lv+ZYmZR+NkcbCR2HHYhiFiyBpQsUzS6aJmQafN9p0TBmLh38UQae50msk uTZhy16rJgKqvEwdTgNpghW2ZxXSr+k2bH+sCMg0DjAZt9XOU1xeS9bjgEXaLvKPJmpo 3HFc4IjgUBY5whdjByDAPDp7CiHSOq71rDQfGto8b083Luu9y33DR6C/pEzBhJC2rzVH 8Wooj0OCSxiZqirJlH5BSlDzu6BzuxruXBPfrNS7/PQtvgg2wQlZ43SdzQlyMBUTbqqQ fkC5qqBO9Waf8PcolDIbH2IxkPO7ibIgXhlqINviXyF/D49ycgaC4LIVtpYfpngBLYjA V8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686845546; x=1689437546; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ipGWMpKeO73jNejXxgrLcxYtub8woVobANhxBUz4FP8=; b=YRVWytH8S9/8S3RkGbzNcUb5pyOJYZaJlXj8VVtXAN8yLhfLuwvOgvDgALN2pUh6Fw C9ynUuJfvGPZjOlMxarqp7T0DPXX/5peHcbaaOc540BggFoE7g2rk3EvFrormvrBMis3 N69owyDiu3fNGpU9RILrdb8BivqWPVosPM9IeXXGmAxmZ8jaOZkdG8zWfNgG50xHRSlC H6dsBPmKT7bkv/z+7B8EWt37DNJoEK6y/IGA+fBeFuP3MRNLusq+tfVLeiUTH46FQgsE FECT2FAzJNldKYfNrR8pir5yDnywDLajJM13vmXeo8vu6BK8gf2cREXfBZCmJu4OZX0m sK+Q== X-Gm-Message-State: AC+VfDwjhSzeODRFOpyqBE9c2mx+AzsPgj4STo1dpDj0PRn/p8HbFskR /8ypHfJAboPDa4yEK+dJUf4Rpg== X-Google-Smtp-Source: ACHHUZ7rBl3wzH8vJQgPaAAMB97Lvt7DXkZPaOu9erOOKVvSPzefK+YhdLer8RjB+ximTqGpjzrDZA== X-Received: by 2002:a17:902:e74d:b0:1b1:dfbd:a18c with SMTP id p13-20020a170902e74d00b001b1dfbda18cmr17674355plf.39.1686845545942; Thu, 15 Jun 2023 09:12:25 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id t15-20020a1709027fcf00b001b3d4d74749sm7696524plb.7.2023.06.15.09.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 09:12:25 -0700 (PDT) Date: Thu, 15 Jun 2023 09:12:23 -0700 From: Stephen Hemminger To: Li Feng Cc: David Marchand , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Ray Kinsella , Neil Horman , dev@dpdk.org, lifeng1519@gmail.com Subject: Re: [dpdk-dev] [PATCH v3] log: support custom log function Message-ID: <20230615091223.058b4d9b@hermes.local> In-Reply-To: <20210210052019.802387-1-fengli@smartx.com> References: <20210205112433.1681853-1-fengli@smartx.com> <20210210052019.802387-1-fengli@smartx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 10 Feb 2021 13:20:19 +0800 Li Feng wrote: > By default, the dpdk log is out to stdout/stderr and syslog. > The rte_openlog_stream could set an external FILE* stream, but it asks > the > consumer to give it a FILE* pointer. > For C++ or other languages, it's hard to get a libc FILE*. > > Support to set a hook is another choice for this scenario. > > Signed-off-by: Li Feng > --- Rejecting this patch. You can do the same thing with a small bit of C called during application init that creates a standard I/O stream. Like fopencookie(). The added overhead of adding callback here adds unnecessary complexity.