diff --git a/kong/pdk/log.lua b/kong/pdk/log.lua index 95711d023356..239c16217cb1 100644 --- a/kong/pdk/log.lua +++ b/kong/pdk/log.lua @@ -815,7 +815,7 @@ do end end - local upstream_status = ctx.buffered_status or tonumber(sub(var.upstream_status or "", -3)) + local upstream_status = ctx.buffered_status or var.upstream_status or "" local response_source = okong.response.get_source(ongx.ctx) local response_source_name = TYPE_NAMES[response_source]