From 9feba8f698c4d8598fb2e8eb86feed57a6cbca8f Mon Sep 17 00:00:00 2001 From: potatso Date: Thu, 29 Jun 2023 17:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8D=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=9A=84=E5=86=85=E5=AE=B9=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?pid=E6=96=B9=E4=BE=BF=E8=BF=BD=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/resty/coraza/log.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/resty/coraza/log.lua b/lib/resty/coraza/log.lua index b4f233e..98dc597 100644 --- a/lib/resty/coraza/log.lua +++ b/lib/resty/coraza/log.lua @@ -15,7 +15,9 @@ local WARN = ngx.WARN local DEBUG = ngx.DEBUG local function log(formatstring, ...) - return fmt(ngx.get_phase().." phrase ".."lua-resty-coraza: "..formatstring, ...) + return fmt("PID: "..ngx.worker.pid().. + "\tphrase: "..ngx.get_phase().. + "\tlua-resty-coraza: "..formatstring, ...) end function _M.err_fmt(formatstring, ...)