From e0ac371b2377ba7feda036b30596002f5223781f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=89=E5=AE=89=E7=A7=91=E6=8A=80?= Date: Fri, 4 Oct 2024 10:10:26 +0800 Subject: [PATCH] Update kafka-logger.lua --- plugins/kafka-logger.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/kafka-logger.lua b/plugins/kafka-logger.lua index 3583130..6072f74 100644 --- a/plugins/kafka-logger.lua +++ b/plugins/kafka-logger.lua @@ -37,7 +37,7 @@ function _M.log_post_filter(waf) if waf.msg then local country, province, city = log.ip2loc(waf.ip) - local info = { rule_id = waf.rule_id, ip = waf.ip, host = waf.host, url = waf.reqUri, data = waf.msg, country = country, province = province, city = city, create_at = ngx.localtime() } + local info = { rule_id = waf.rule_id, ip = waf.ip, host = waf.host, url = waf.reqUri, data = log.utf8(waf.msg), req = log.utf8(log.getReq()), country = country, province = province, city = city, create_at = ngx.localtime() } log.broker(kafkaLog, brokerList, info) end end