Changeset

5415:9e7aa5b47bdf

util.helpers: Helper helpers to log host events
author Matthew Wild <mwild1@gmail.com>
date Wed, 03 Apr 2013 13:39:00 +0100
parents 5414:efec29eb4cdd
children 5416:0ba3a49d3863
files util/helpers.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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