修改打印日志的内容,添加pid方便追踪

This commit is contained in:
potatso 2023-06-29 17:47:52 +08:00
parent fc7baf2f38
commit 9feba8f698

View File

@ -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, ...)