From 9727f61371bb7dce44d088f2a3c2b347815efedc Mon Sep 17 00:00:00 2001 From: Armin Brauns Date: Mon, 7 Aug 2023 09:21:05 +0000 Subject: [PATCH] logging: return actual filter level when runtime filter is disabled log_filter_set() is defined to return the actual level that was set by the call. In case runtime filtering is disabled, this is always the compiled-in log level, not the level passed by the user. Signed-off-by: Armin Brauns --- subsys/logging/log_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/logging/log_mgmt.c b/subsys/logging/log_mgmt.c index 1f3e3594760..08de43165bc 100644 --- a/subsys/logging/log_mgmt.c +++ b/subsys/logging/log_mgmt.c @@ -417,7 +417,7 @@ uint32_t z_impl_log_filter_set(struct log_backend const *const backend, uint32_t level) { if (!IS_ENABLED(CONFIG_LOG_RUNTIME_FILTERING)) { - return level; + return log_compiled_level_get(domain_id, source_id); } __ASSERT_NO_MSG(source_id < log_src_cnt_get(domain_id));