Thread (133 messages) 133 messages, 14 authors, 2024-09-25

Re: [dpdk-dev] [PATCH v4 07/11] eal: add log level help

From: David Marchand <hidden>
Date: 2021-03-23 18:18:42

On Tue, Mar 23, 2021 at 4:10 PM Thomas Monjalon [off-list ref] wrote:
23/03/2021 14:37, David Marchand:
quoted
On Sun, Mar 21, 2021 at 11:32 PM Thomas Monjalon [off-list ref] wrote:
quoted
The option --log-level was not completely described in the usage text,
and it was difficult to guess the names of the log types and levels.

A new value "help" is accepted after --log-level to give more details
about the syntax and listing the log types and levels.

The array "levels" used for level name parsing is replaced with
a (modified) existing function which was used in rte_log_dump().
If we forget about the slightly different formatting, why not simply
reuse rte_log_dump?
It has the advantage of listing the default level for each logtype
that a user cannot guess otherwise.
I considered rte_log_dump() too much verbose for the help text.
It is printing the global level and the logtype ids.
Yes, it gives all the info about the log subsystem.
The need for the end-user in the help is different of a debug dump.
The result of rte_log_list_types is a list in link-time order.
At least it is worth sorting alphabetically for users.

What about default log levels?


-- 
David Marchand
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help