aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-03 13:39:00 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-03 13:39:00 +0100
commit2aa7b4448ebbfde9202d277bf595cbb907a03c24 (patch)
tree20386f96ef0da122f7fb1c3a5f093c0b868b2c7f /util
parent3230dc4c0a66f96726a190e30fdf67e64b8c15b8 (diff)
downloadprosody-2aa7b4448ebbfde9202d277bf595cbb907a03c24.tar.gz
prosody-2aa7b4448ebbfde9202d277bf595cbb907a03c24.zip
util.helpers: Helper helpers to log host events
Diffstat (limited to 'util')
-rw-r--r--util/helpers.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/helpers.lua b/util/helpers.lua
index 6103a319..08b86a7c 100644
--- a/util/helpers.lua
+++ b/util/helpers.lua
@@ -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