From 61f06f07ee26c5ae5aa15e94ab2373b50d3b0ebd Mon Sep 17 00:00:00 2001 From: Muhammed Answar C K <72187008+answarck@users.noreply.github.com> Date: Wed, 10 Dec 2025 12:21:06 +0530 Subject: [PATCH] Fix `rz-find` ignoring `RZ_LOGLEVEL`. (#5592) --- librz/main/rz-find.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/librz/main/rz-find.c b/librz/main/rz-find.c index a16ee15bef..19f735bd2f 100644 --- a/librz/main/rz-find.c +++ b/librz/main/rz-find.c @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: 2009-2020 pancake // SPDX-License-Identifier: LGPL-3.0-only +#include +#include #include #include @@ -515,6 +517,16 @@ RZ_API int rz_main_rz_find(int argc, const char **argv) { int c; const char *file = NULL; + int n = RZ_DEFAULT_LOGLVL; + char *log_level = rz_sys_getenv("RZ_LOGLEVEL"); + if (RZ_STR_ISNOTEMPTY(log_level)) { + n = atoi(log_level); + free(log_level); + } + if (n >= 0 && n < RZ_LOGLVL_SIZE) { + rz_log_set_level((RzLogLevel)n); + } + RzGetopt opt; rz_getopt_init(&opt, argc, argv, "a:ie:b:jmM:s:w:S:I:x:Xzf:F:t:E:rqnhvZ"); while ((c = rz_getopt_next(&opt)) != -1) {