summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMykyta Yatsenko <yatsenko@meta.com>2024-05-24 15:18:40 +0200
committerAndrii Nakryiko <andrii@kernel.org>2024-05-29 01:25:06 +0200
commiteb4e7726279a344c82e3c23be396bcfd0a4d5669 (patch)
tree4aca2e5c18389f01ec9919e13ea4f728792b474b /Documentation
parentMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf... (diff)
downloadlinux-eb4e7726279a344c82e3c23be396bcfd0a4d5669.tar.xz
linux-eb4e7726279a344c82e3c23be396bcfd0a4d5669.zip
libbpf: Configure log verbosity with env variable
Configure logging verbosity by setting LIBBPF_LOG_LEVEL environment variable, which is applied only to default logger. Once user set their custom logging callback, it is up to them to handle filtering. Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240524131840.114289-1-yatsenko@meta.com
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/bpf/libbpf/libbpf_overview.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/bpf/libbpf/libbpf_overview.rst b/Documentation/bpf/libbpf/libbpf_overview.rst
index f36a2d4ffea2..f4d22f0c62b0 100644
--- a/Documentation/bpf/libbpf/libbpf_overview.rst
+++ b/Documentation/bpf/libbpf/libbpf_overview.rst
@@ -219,6 +219,14 @@ compilation and skeleton generation. Using Libbpf-rs will make building user
space part of the BPF application easier. Note that the BPF program themselves
must still be written in plain C.
+libbpf logging
+==============
+
+By default, libbpf logs informational and warning messages to stderr. The
+verbosity of these messages can be controlled by setting the environment
+variable LIBBPF_LOG_LEVEL to either warn, info, or debug. A custom log
+callback can be set using ``libbpf_set_print()``.
+
Additional Documentation
========================