DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Owen Hilyard <ohilyard@iol.unh.edu>
Cc: "Honnappa Nagarahalli" <Honnappa.Nagarahalli@arm.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Aman Singh" <aman.deep.singh@intel.com>,
	"Yuying Zhang" <yuying.zhang@intel.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>, "Lijuan Tu" <lijuan.tu@intel.com>,
	"Juraj Linkeš" <juraj.linkes@pantheon.tech>, nd <nd@arm.com>
Subject: Re: testpmd logging
Date: Tue, 8 Nov 2022 08:40:21 -0800	[thread overview]
Message-ID: <20221108084021.251b85ac@hermes.local> (raw)
In-Reply-To: <CAHx6DYBNsFqxwCJ0B3c7dB1X2HgfOa7EGKsg2akOcU7YcBv7ow@mail.gmail.com>

On Tue, 8 Nov 2022 11:24:53 -0500
Owen Hilyard <ohilyard@iol.unh.edu> wrote:

> On Tue, Nov 8, 2022 at 9:37 AM Honnappa Nagarahalli <
> Honnappa.Nagarahalli@arm.com> wrote:  
> 
> > + Lijuan, Owen, Juraj
> >  
> > > -----Original Message-----
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > Sent: Tuesday, November 8, 2022 7:02 AM
> > > To: Aman Singh <aman.deep.singh@intel.com>; Yuying Zhang
> > > <yuying.zhang@intel.com>
> > > Cc: david.marchand@redhat.com; dev@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.

My thoughts.
  1. testpmd should use its own log level, not EAL
  2. testpmd could easily have an option "--json" to format output in JSON
  3. testpmd is a mess some logs use RTE_LOG() some go to stdout, some to stderr.


  reply	other threads:[~2022-11-08 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 13:02 Thomas Monjalon
2022-11-08 14:37 ` Honnappa Nagarahalli
2022-11-08 16:24   ` Owen Hilyard
2022-11-08 16:40     ` Stephen Hemminger [this message]
2022-11-11  8:26       ` Zhang, Yuying

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221108084021.251b85ac@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=aman.deep.singh@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=juraj.linkes@pantheon.tech \
    --cc=lijuan.tu@intel.com \
    --cc=nd@arm.com \
    --cc=ohilyard@iol.unh.edu \
    --cc=thomas@monjalon.net \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).