From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail1.empirix.com (bilemail1.empirix.com [208.67.76.245]) by dpdk.org (Postfix) with ESMTP id 4B3312BB4 for ; Tue, 4 Oct 2016 12:24:19 +0200 (CEST) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail1.empirix.com (10.17.8.30) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 4 Oct 2016 06:24:18 -0400 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.1178.000; Tue, 4 Oct 2016 06:24:18 -0400 From: "Montorsi, Francesco" To: "dev@dpdk.org" Thread-Topic: Proposal: enable redirection of DPDK logs from the user app Thread-Index: AdIeKK66V/qdjvS8QiaE91re7uFfpg== Date: Tue, 4 Oct 2016 10:24:17 +0000 Message-ID: <32054c5dd466431ebf99d84641c6313a@bilemail1.empirix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.12.50.52] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Proposal: enable redirection of DPDK logs from the user app X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 10:24:19 -0000 Hi all, I've not been following closely latest DPDK activity but my company is usin= g DPDK and we recently upgraded to 16.07.=20 We apply several patches to DPDK sources, to make it more similar to a "sta= ndard library" (currently it is quite intrusive: calls abort() at will, wri= tes its own log, etc etc)... I think that it may be useful to give back to = the community some of these (small) "enhancements". One of them is about logging: as the application where we embed DPDK alread= y has its log file, we want DPDK to log in our log facility framework.=20 My "fix" is simple: I just put a callback function in RTE logging system th= at, by default, points to the existing rte_vlog() function. If needed the l= ibrary user can provide its own callback function to do what he likes. The attached patch is what we use right now. I totally understand it needs = some rework to put it in a better shape... but first of all: are you intere= sted in such patch?=20 Thanks, Francesco Montorsi