Thread (21 messages) 21 messages, 5 authors, 2023-06-15

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

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-02-05 16:39:29

On Fri, 5 Feb 2021 20:22:36 +0800
Feng Li [off-list ref] wrote:
David Marchand [off-list ref] 于2021年2月5日周五 下午7:56写道:
quoted
On Fri, Feb 5, 2021 at 12:25 PM Li Feng [off-list ref] wrote:  
quoted
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.

Use a custom logger function may be a better choice.
A FILE * stream can be created that uses any other function under
the covers. See fopencookie(3)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help