lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZAutRXf+W+ExaHjFMtWCfot9HkTWZNGuPckBiXqFcJeQ@mail.gmail.com>
Date:   Fri, 25 Oct 2019 09:58:52 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next] libbpf: Add libbpf_set_log_level() function to
 adjust logging

On Fri, Oct 25, 2019 at 4:50 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> Currently, the only way to change the logging output of libbpf is to
> override the print function with libbpf_set_print(). This is somewhat
> cumbersome if one just wants to change the logging level (e.g., to enable

No, it's not. Having one way of doing things is good, proliferation of
APIs is not a good thing. Either way you require application to write
some additional code. Doing simple vprintf-based (or whatever
application is using to print logs, which libbpf shouldn't care
about!) function with single if is not hard and is not cumbersome. If
you care about helping users to be less confused on how to do that, I
think it would be a good idea to have some sort of libbpf-specific FAQ
with code samples on how to achieve typical and common stuff, like
this one. So please instead consider doing that.


> debugging), so add another function that just adjusts the default output
> printing by adjusting the filtering of messages.
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---
>  tools/lib/bpf/libbpf.c   | 12 +++++++++++-
>  tools/lib/bpf/libbpf.h   |  2 ++
>  tools/lib/bpf/libbpf.map |  1 +
>  3 files changed, 14 insertions(+), 1 deletion(-)
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ