Skip to content

Commit

Permalink
print data for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 19, 2023
1 parent 51007b9 commit db31602
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lualib/resty/events/callback.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function _M:do_event(d)
local wid = d.wid

log(DEBUG, "worker-events: handling event; source=", source,
", event=", event, ", wid=", wid)
", event=", event, ", wid=", wid, ", data=", cjson_encode(data))

local funcs = self._funcs
local list
Expand Down
2 changes: 2 additions & 0 deletions lualib/resty/events/worker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ function _M:publish(target, source, event, data)
assert(type(source) == "string" and source ~= "", "source is required")
assert(type(event) == "string" and event ~= "", "event is required")

log(DEBUG, "source=", source, ", event=", event, ", data=", cjson_encode(data))

-- fall back to local events
if self._opts.testing == true then
log(DEBUG, "event published to 1 workers")
Expand Down

0 comments on commit db31602

Please sign in to comment.