Skip to content

Commit

Permalink
clean logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 5, 2024
1 parent 76564d6 commit 1c89c33
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions kong/clustering/rpc/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ function _M:call(node_id, method, ...)
if res == "local" then
res, err = self:_local_call(node_id, method, params)

ngx_log(ngx_DEBUG, "[rpc] ", method, " err: ", err)

if not res then
ngx_log(ngx_DEBUG, "[rpc] ", method, " failed, err: ", err)
return nil, err
end

ngx_log(ngx_DEBUG, "[rpc] ", method, " succeeded")

return res
end

Expand All @@ -199,16 +200,20 @@ function _M:call(node_id, method, ...)

local ok, err = fut:wait(5)

ngx_log(ngx_DEBUG, "[rpc] ", method, " err: ", err)

if err then
ngx_log(ngx_DEBUG, "[rpc] ", method, " failed, err: ", err)

return nil, err
end

if ok then
ngx_log(ngx_DEBUG, "[rpc] ", method, " succeeded")

return fut.result
end

ngx_log(ngx_DEBUG, "[rpc] ", method, " failed, err: ", fut.error.message)

return nil, fut.error.message
end

Expand Down

0 comments on commit 1c89c33

Please sign in to comment.