Re: [dpdk-dev] [RFC PATCH] log: track log level changes
From: David Marchand <hidden>
Date: 2021-03-23 08:19:44
Hello Lukasz, On Thu, Jul 9, 2020 at 2:16 AM Lukasz Wojciechowski [off-list ref] wrote:
W dniu 26.06.2020 o 16:46, Andrew Rybchenko pisze:quoted
On 6/26/20 2:47 PM, David Marchand wrote:quoted
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