Skip to content

Commit

Permalink
fix(log) add logging for worker events call (#60)
Browse files Browse the repository at this point in the history
closes #25
  • Loading branch information
Tieske committed Sep 21, 2020
1 parent c54f6d7 commit 70bb197
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Versioning is strictly based on [Semantic Versioning](https://semver.org/)
* fix: prevent target-list from being nil, due to async behaviour [#44](https://github.com/Kong/lua-resty-healthcheck/pull/44)
* fix: replace timer and node-wide locks with resty-timer, to prevent interval
skips [#59](https://github.com/Kong/lua-resty-healthcheck/pull/59)
* change: added additional logging on posting events [#25](https://github.com/Kong/lua-resty-healthcheck/issues/25)

### 1.3.0 (17-Jun-2020)

Expand Down
5 changes: 4 additions & 1 deletion lib/resty/healthcheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ end
-- Raises an event for a target status change.
function checker:raise_event(event_name, ip, port, hostname)
local target = { ip = ip, port = port, hostname = hostname }
worker_events.post(self.EVENT_SOURCE, event_name, target)
local ok, err = worker_events.post(self.EVENT_SOURCE, event_name, target)
if not ok then
self:log(ERR, "failed to post event '", event_name, "' with: ", err)
end
end


Expand Down

0 comments on commit 70bb197

Please sign in to comment.