From b39f1827e1914a1be4ee2a0ba8c7cb0bb2963d62 Mon Sep 17 00:00:00 2001 From: samugi Date: Mon, 1 Jul 2024 12:40:32 +0200 Subject: [PATCH] fixup! feat(observability): add OpenTelemetry logs --- kong/observability/logs.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kong/observability/logs.lua b/kong/observability/logs.lua index 9f1ad587e0e6..e824426a79ad 100644 --- a/kong/observability/logs.lua +++ b/kong/observability/logs.lua @@ -105,6 +105,11 @@ function _M.maybe_push(stack_level, log_level, ...) -- Early return cases: + -- log level too low + if configured_log_level() < log_level then + return + end + -- no (or empty) log line local args = { ... } local log_str = concat_tostring(args) @@ -112,11 +117,6 @@ function _M.maybe_push(stack_level, log_level, ...) return end - -- log level too low - if configured_log_level() < log_level then - return - end - local log_buffer, max_logs local request_id = request_id_get() local request_scoped = request_id ~= nil