From a84eb0bc1ec598888cd43fe68771e907384f413d Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Wed, 23 Jul 2025 13:26:19 +0900 Subject: [PATCH] NetBpfLoad: suppress debug log if NETBPFLOAD_VERBOSE_LOG is not defined Reduces ~900 lines of log spam by suppressing non-warning messages. Verbose logging can be re-enabled for debugging by defining the NETBPFLOAD_VERBOSE_LOG macro. Bug: 428792764 Flag: EXEMPT logging only change Test: TH Change-Id: Ieac3e7ee843b889fb404a89cfe2319ec34ab365c --- bpf/loader/NetBpfLoad.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp index 77756a86e8..3e12783005 100644 --- a/bpf/loader/NetBpfLoad.cpp +++ b/bpf/loader/NetBpfLoad.cpp @@ -1835,6 +1835,9 @@ static bool isWear() { static int libbpfPrint(enum libbpf_print_level lvl, const char *const formatStr, va_list argList) { +#ifndef NETBPFLOAD_VERBOSE_LOG + if (lvl != LIBBPF_WARN) return 0; +#endif int32_t prio; switch (lvl) { case LIBBPF_WARN: