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.
>>
>> Suggested-by: Ilya Maximets <i.maxim...@ovn.org>
>> Signed-off-by: David Marchand <david.march...@redhat.com>
> Acked-by: Andrew Rybchenko <arybche...@solarflare.com>
>
I also like the idea so:

Acked-by: Lukasz Wojciechowski <l.wojciec...@partner.samsung.com>

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"

Best regards

-- 

Lukasz Wojciechowski
Principal Software Engineer

Samsung R&D Institute Poland
Samsung Electronics
Office +48 22 377 88 25
l.wojciec...@partner.samsung.com

Reply via email to