log with pl.pretty

This commit is contained in:
moicen
2022-06-26 17:31:05 +08:00
parent 8ddd8e67d2
commit 46f27ba9d5
+2 -1
View File
@@ -1,5 +1,6 @@
local cjson = require "cjson"
local http = require "resty.http"
local pl = require "pl.pretty"
local httpc = http.new()
local sudoerToken = ngx.req.get_headers().HtySudoerToken
@@ -35,7 +36,7 @@ local function get_access_token()
}
)
ngx.log(ngx.INFO, "RESP -> ", cjson.encode(resp))
ngx.log(ngx.INFO, "RESP -> ", pl.write(resp))
ngx.log(ngx.ERR, "ERR -> ", err)
if resp == nil then