[dpdk-dev] [PATCH v2 2/3] log: track log level changes
Thomas Monjalon
thomas at monjalon.net
Fri Apr 9 11:12:57 CEST 2021
09/04/2021 11:08, David Marchand:
> On Thu, Apr 8, 2021 at 5:55 PM Thomas Monjalon <thomas at monjalon.net> wrote:
> >
> > 24/03/2021 11:32, David Marchand:
> > > Add a log message when registering log types and changing log levels.
> > [...]
> > > + RTE_LOG(DEBUG, EAL, "%s logtype level changed from %s to %s\n",
> >
> > I would prefer "foo log level changed"
> > instead of "foo logtype level changed".
> > Opinions?
>
> No objection for me.
>
>
> >
> > > + rte_logs.dynamic_types[type].name == NULL ?
> > > + "" : rte_logs.dynamic_types[type].name,
> >
> > In which case the logtype name is undefined?
>
> The logtype name is strdup().
> When registering static logtypes, this could fail, and we log the
> level change at this point.
>
> The other path would be to call rte_log_set_level() on those static
> logtypes (there is also the case of the holes in the static logtypes,
> but if users are using them, it sounds like a hack).
>
> > If it is unexexpected, should we have "unknown" instead of ""?
>
> We could still register a "unknown" logtype, and then it would be odd :-).
> Empty is clear to me.
OK
Anyway it is unlikely.
More information about the dev
mailing list