From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 708CE68CA for ; Tue, 4 Oct 2016 13:26:25 +0200 (CEST) Received: from lfbn-1-5996-232.w90-110.abo.wanadoo.fr ([90.110.195.232] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1brNuf-0007y8-FW; Tue, 04 Oct 2016 13:29:33 +0200 To: "Montorsi, Francesco" , "dev@dpdk.org" References: <32054c5dd466431ebf99d84641c6313a@bilemail1.empirix.com> From: Olivier Matz Message-ID: Date: Tue, 4 Oct 2016 13:26:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <32054c5dd466431ebf99d84641c6313a@bilemail1.empirix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [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 11:26:25 -0000 Hi Francesco, On 10/04/2016 12:24 PM, Montorsi, Francesco wrote: > Hi all, > I've not been following closely latest DPDK activity but my company is using DPDK and we recently upgraded to 16.07. > We apply several patches to DPDK sources, to make it more similar to a "standard library" (currently it is quite intrusive: calls abort() at will, writes 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 already has its log file, we want DPDK to log in our log facility framework. > My "fix" is simple: I just put a callback function in RTE logging system that, by default, points to the existing rte_vlog() function. If needed the library 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 interested in such patch? It seems the mailing list stripped your patch sent as attachment. Can you please resend it again in the body of the mail? I think we can already redirect logs to a file by using fopencookie() + rte_openlog_stream(). Did you already check these functions? Regards, Olivier