# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1364992740 -3600
# Node ID 9e7aa5b47bdf93671a4e1ebf65c81163050526a1
# Parent  efec29eb4cdd44f57f6f4ebef4a5c712c6b32fc8
util.helpers: Helper helpers to log host events

diff -r efec29eb4cdd -r 9e7aa5b47bdf util/helpers.lua
--- a/util/helpers.lua	Wed Apr 03 13:38:27 2013 +0100
+++ b/util/helpers.lua	Wed Apr 03 13:39:00 2013 +0100
@@ -14,6 +14,14 @@
 
 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