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

Stephen Hemminger stephen at networkplumber.org
Thu Jun 15 18:12:23 CEST 2023


On Wed, 10 Feb 2021 13:20:19 +0800
Li Feng <fengli at smartx.com> wrote:

> By default, the dpdk log is out to stdout/stderr and syslog.
> The rte_openlog_stream could set an external FILE* stream, but it asks
> the
> consumer to give it a FILE* pointer.
> For C++ or other languages, it's hard to get a libc FILE*.
> 
> Support to set a hook is another choice for this scenario.
> 
> Signed-off-by: Li Feng <fengli at smartx.com>
> ---

Rejecting this patch.
You can do the same thing with a small bit of C called during application
init that creates a standard I/O stream. Like fopencookie().

The added overhead of adding callback here adds unnecessary complexity.


More information about the dev mailing list