[dpdk-dev] [PATCH] log: support custom log function

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Fri Feb 5 15:08:11 CET 2021


On Fri, 5 Feb 2021 20:22:36 +0800, Feng Li wrote:
> David Marchand <david.marchand at redhat.com> 于2021年2月5日周五 下午7:56写道:
> >
> > On Fri, Feb 5, 2021 at 12:25 PM Li Feng <fengli at smartx.com> wrote:  
> > >
> > > Currently, the dpdk log is out to stdout/stderr and syslog.
> > > We should support to output the log to another please, e.g. file or
> > > glog.  
> >
> > Why not use rte_openlog_stream() / rte_log_get_stream() ?
> >
> >
> > --
> > David Marchand
> >  
> rte_openlog_stream seems it could set an external FILE* stream.
> However, in the glog or C++ io stream, it's stream like std::cout.
> I think it's hard to use a FILE* stream to unify them.

Also, FILE* is not a language-agnostic interface. Rust/D/etc consumers can't
use this API unless they obtain a FILE* from a compatible libc.


More information about the dev mailing list