testpmd logging

Owen Hilyard ohilyard at iol.unh.edu
Tue Nov 8 17:24:53 CET 2022


On Tue, Nov 8, 2022 at 9:37 AM Honnappa Nagarahalli <
Honnappa.Nagarahalli at arm.com> wrote:

> + Lijuan, Owen, Juraj
>
> > -----Original Message-----
> > From: Thomas Monjalon <thomas at monjalon.net>
> > Sent: Tuesday, November 8, 2022 7:02 AM
> > To: Aman Singh <aman.deep.singh at intel.com>; Yuying Zhang
> > <yuying.zhang at intel.com>
> > Cc: david.marchand at redhat.com; dev at dpdk.org
> > Subject: testpmd logging
> >
> > Hello,
> >
> > I see testpmd is doing log with EAL entity. Example:
> >       RTE_LOG(ERR, EAL, "The device: %s has been added!\n"
> > We could also discuss the log level.
> >
> > Please can we work on replacing these logs?
>

If we want to revisit logging in testpmd, even though I know I'm invoking a
case of second system syndrome here, I would love to see some form of
structured logging output. Even just writing out records to a CSV file with
proper escaping would work great, or doing a json object per log record as
a backup. JSON might be easier since libjansson is already in DPDK, and we
could disable the json logging flag if libjansson was not present at
compile time.


> DTS uses some of the logs from testpmd to validate the results. I am not
> sure what all logs are used.


The old version of dts (the one with its own repository) is fairly tightly
bound to testpmd's logging.

> We need to choose how to log (printf or registered log entity) and be
> > consistent.
> > What do you think?
>

Registered log entries are much better in my opinion since they provide a
more machine-friendly format and DTS has to parse testpmd output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20221108/7002bc39/attachment.htm>


More information about the dev mailing list