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 F0CD442D27 for ; Thu, 22 Jun 2023 17:45:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B587141104; Thu, 22 Jun 2023 17:45:40 +0200 (CEST) Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by mails.dpdk.org (Postfix) with ESMTP id 2AEA040DDA for ; Thu, 22 Jun 2023 17:45:39 +0200 (CEST) Received: from [192.168.23.182] (unknown [83.240.60.247]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id DEE56400072 for ; Thu, 22 Jun 2023 17:45:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2-2020; t=1687448738; bh=sUi6WwKKVv6tOd8FQm7oJvf7lOzcRHPAy+g6ZWLy2lY=; h=Date:To:From:Subject; b=MMqvawJfhIpi7+MB0CoMAWGpkZ7mfucQzb8Tnjn5i7asJ9l6RmAvDk5rfdOQkMSVO +2gejyGUeLMbiq0TL3xdUOPlrCy5ArCimcm4mh+5oyeQU1JYUgJQHgV/NSZsl8sNK9 wO+waCvtnLpngoynZI29qmoUB+EIOuqA26mt0/CzBfK5ycRpGKJRu0DGWH4saVwY/e 7cd2mKEA1Qx9exoSB0rh0jw+7Fw5K8Fzdxdr18bo0F36QRuHwyCR1cMtODhZpK3f99 rV4DROMvUcwvT2ERFPPqCCtpkO2VBSCfvErppVDFhRwM7aySh7oIyU3lwW4I3teYOW lwg37UvKSL2iA== Message-ID: <8575de3e-d63f-f4c6-dd15-92e576c622f6@cesnet.cz> Date: Thu, 22 Jun 2023 17:45:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: users@dpdk.org From: =?UTF-8?B?THVrw6HFoSDFoGnFoW1pxaE=?= Subject: Wrapping DPDK log messages with an application logger Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 all, I would like to ask you if you know of a way how could I wrap log messages coming from the DPDK by an application logger so that output of the application is unified. I would think there could be opportunity to pass my logging callback into DPDK but I have not found it. The only thing that I found was setting the stream (rte_openlog_stream()). So I think I could use a Linux pipe to which DPDK would write to and the application would read the contents of it, parsing it into messages and logging it with the application logger. The proposed solution is described in this ticket: https://redmine.openinfosecfoundation.org/issues/6114 Is there any alternative solution? To provide an example of what I am talking about, currently the application output is as follows: """ Config: affinity: Found affinity definition for "worker-cpu-set" [AffinitySetupLoadFromConfig:util-affinity.c:201] Config: affinity: Using default prio 'medium' for set 'worker-cpu-set' [AffinitySetupLoadFromConfig:util-affinity.c:249] <- colored log from Suricata EAL: No free 2048 kB hugepages reported on node 0 <- DPDK log """ Here is an example of the ideal output: """ Config: affinity: Found affinity definition for "worker-cpu-set" [AffinitySetupLoadFromConfig:util-affinity.c:201] Config: affinity: Using default prio 'medium' for set 'worker-cpu-set' [AffinitySetupLoadFromConfig:util-affinity.c:249] <- colored log from Suricata Info: EAL: No free 2048 kB hugepages reported on node 0 <- also colored log from Suricata """ Thank you in advance. Cheers, Lukas