Thread (13 messages) 13 messages, 4 authors, 2019-05-07

Re: [PATCH bpf-next 1/6] tools: bpftool: add --log-libbpf option to get debug info from libbpf

From: Jakub Kicinski <hidden>
Date: 2019-04-30 19:40:18
Also in: bpf

On Tue, 30 Apr 2019 08:31:53 -0700, Y Song wrote:
On Tue, Apr 30, 2019 at 2:34 AM Quentin Monnet
[off-list ref] wrote:
quoted
Hi Yonghong,

2019-04-29 16:32 UTC-0700 ~ Y Song [off-list ref]  
quoted
On Mon, Apr 29, 2019 at 2:53 AM Quentin Monnet
[off-list ref] wrote:  
quoted
libbpf has three levels of priority for output: warn, info, debug. By
default, debug output is not printed to stderr.

Add a new "--log-libbpf LOG_LEVEL" option to bpftool to provide more
flexibility on the log level for libbpf. LOG_LEVEL is a comma-separated
list of levels of log to print ("warn", "info", "debug"). The value
corresponding to the default behaviour would be "warn,info".  
Do you think option like "warn,debug" will be useful for bpftool users?
Maybe at bpftool level, we could allow user only to supply minimum level
for log output, e.g., "info" will output "warn,info"?  
I've been pondering this, too. Since we allow to combine all levels for
the verifier logs it feels a bit odd to be less flexible for libbpf. And
we could imagine a user who wants verifier logs (so libbpf "debug") but
prefers to limit libbpf output (so no "info")... Although I admit this
might be a bit far-fetched.

I can resend a version with the option taking only the minimal log
level, as you describe, if you think this is best.  
Thanks, I think providing a single minimum level for output probably
better.
I have a weak preference for what we have here, because it's similar to
the kernel bit opt in (log level, stats etc)..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help