[dpdk-dev] [RFC PATCH] log: track log level changes

David Marchand david.marchand at redhat.com
Tue Mar 23 09:19:27 CET 2021


Hello Lukasz,

On Thu, Jul 9, 2020 at 2:16 AM Lukasz Wojciechowski
<l.wojciechow at partner.samsung.com> wrote:
>
>
> W dniu 26.06.2020 o 16:46, Andrew Rybchenko pisze:
> > On 6/26/20 2:47 PM, David Marchand wrote:
> >> Add a log message when changing log levels to be sure of which logtype
> >> is enabled.
> >>
>
> although I think there is one place that can be smoothed a bit. Every
> newly registered type's loglevel is set to RTE_LOG_INFO in
> __rte_log_register(), so:
> * if new type is registered with rte_log_register_type_and_pick_level()
> and level is set to INFO, nothing will be printed (as current is equal
> to new level);
> * any registration made with rte_log_register() won't be seen either as
> there is no call to newly introduced function logtype_set_level().
>
> How about additionally changing behavior so any registration will print
> change from "disabled" (level=0) to new level:
> * in case of rte_log_register_type_and_pick_level() to chosen level
> * in case of rte_log_register() to default level which is "info"

Sorry, I had forgotten about this rfc... reviving it as I am reviewing
some log patch.
Good idea, I will post a v1 with this.


-- 
David Marchand



More information about the dev mailing list