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 9811142D26 for ; Thu, 22 Jun 2023 18:08:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6694640DDA; Thu, 22 Jun 2023 18:08:28 +0200 (CEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id C6DC1406BA for ; Thu, 22 Jun 2023 18:08:27 +0200 (CEST) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4f86d8a8fd4so7524431e87.3 for ; Thu, 22 Jun 2023 09:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687450107; x=1690042107; 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=a2fm/Jz0JHRf7AgqPzzZi4lJ8bp2h2Tpcn3AaAjKiz0=; b=I7IjDUIyEqKdmIMC9rA9nf01CCTOzdibHlqQt/3xaaNC67YkZq9pPD1Bd+RMFe3u9R fmB7LYVtnsP2IBaZlwRpUzs/rYwWLHzfD7Tqeele4ARXbhIAdQttO74yO7mtjJzUxjom hxqhGOjErhy5kwYk+3w75f2Mqc0gnN5K2ogx98H3jz92gawfR54cddymKMdR3m6jcw+t QUIiQ4JU4g//cSoZ/XuXxwvhidB90s+BnC9yvOrmR7y87Frin1nhBF/pz26SoWJeDSIh EAb5PsG2LeeASp6Ej4g+C9wyYTLx+yRtpPf28PzxcQzMQr8h2eZoM8c9P0lMpX6XXz6Z O5vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687450107; x=1690042107; 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=a2fm/Jz0JHRf7AgqPzzZi4lJ8bp2h2Tpcn3AaAjKiz0=; b=eLIebSNf4x6MBSZrgdv9MtP2PyNHcH+YN7Fp9rSFHEG2CeimbQuOfIZDHM3r/tYokV Pn6h0S2Qf0UIBXR9a/yjgn5y+NJOUco705+3fNCV8v0zgcC+VqjFNwtrEEvxztH8SW6P jNinf21AYljAYRHS1GoBKT6QLgt4pN2hpNX17zOF58BxNjSE5Vw9G2gyE5PkzNTnKQeU zonUPI+TCzFWoFb99UEstpDJqufplxCCf96gUGvuQwkgnsmsap+Tnzc83ZIG+46tQd2Y YGkJcz4iAWcruWTDg6tQ9hZLlme7JP+h4AS92dBDbgBNgApcrJK+ozn4ohPDcrDv/d4w zIlg== X-Gm-Message-State: AC+VfDyfKNY4rSKac2JdWtswEsWZmOa1eQJoF/aR1xT7nxurqfz6EZBh fBs2dXHpQkw6PWhPB2bwTvqRG1qujoQ= X-Google-Smtp-Source: ACHHUZ7NTDM4khCQvR4egaYIQgmKqfHNtkTDMnrm9oHtaPMOVh1ZUXB+DbzQEiZcoEZHyrt9Ow2Q+w== X-Received: by 2002:a05:6512:555:b0:4f8:75d5:8af8 with SMTP id h21-20020a056512055500b004f875d58af8mr7286953lfl.4.1687450106861; Thu, 22 Jun 2023 09:08:26 -0700 (PDT) Received: from sovereign (broadband-109-173-110-33.ip.moscow.rt.ru. [109.173.110.33]) by smtp.gmail.com with ESMTPSA id q2-20020ac246e2000000b004eb12850c40sm1164607lfo.14.2023.06.22.09.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 09:08:26 -0700 (PDT) Date: Thu, 22 Jun 2023 19:08:25 +0300 From: Dmitry Kozlyuk To: =?UTF-8?B?THVrw6HFoSDFoGnFoW1pxaE=?= Cc: users@dpdk.org Subject: Re: Wrapping DPDK log messages with an application logger Message-ID: <20230622190825.57eebf75@sovereign> In-Reply-To: <8575de3e-d63f-f4c6-dd15-92e576c622f6@cesnet.cz> References: <8575de3e-d63f-f4c6-dd15-92e576c622f6@cesnet.cz> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Hi, 2023-06-22 17:45 (UTC+0200), Luk=C3=A1=C5=A1 =C5=A0i=C5=A1mi=C5=A1: > I would think there could be opportunity to pass my logging callback into > DPDK but I have not found it. FWIW, I too think a callback would be better than what DPDK offers now, because FILE* argument in rte_openlog_stream() is specific to C (libc). > The only thing that I found was setting the stream (rte_openlog_stream()). Correct, this is what you're supposed to use. > So I think I could use a Linux pipe to which DPDK would write to and the= =20 > application would read the contents of it, parsing it into messages and=20 > logging it with the application logger. > Is there any alternative solution? https://man7.org/linux/man-pages/man3/fopencookie.3.html It's effectively a way to pass the callback you want, just wrapped in a FIL= E*.