util.helpers: Helper helpers to log host events

This commit is contained in:
Matthew Wild 2013-04-03 13:39:00 +01:00
parent 3230dc4c0a
commit 2aa7b4448e

View file

@ -14,6 +14,14 @@ module("helpers", package.seeall);
local log = require "util.logger".init("util.debug");
function log_host_events(host)
return log_events(prosody.hosts[host].events, host);
end
function revert_log_host_events(host)
return revert_log_events(prosody.hosts[host].events);
end
function log_events(events, name, logger)
local f = events.fire_event;
if not f then