mod_log_events/mod_log_events.lua
author Kim Alvefur <zash@zash.se>
Wed, 28 Oct 2015 15:03:49 +0100
changeset 1942 cfe73f64ad29
parent 1641 9276473ee5be
child 1999 0e008f36a91c
permissions -rw-r--r--
mod_auth_http_async: Fix syntax error

module:set_global();

local helpers = require "util.helpers";

helpers.log_events(prosody.events, "global", module._log);

function module.add_host(module)
	helpers.log_events(prosody.hosts[module.host].events, module.host, module._log);
end

function module.remove_host(module)
	helpers.revert_log_events(prosody.hosts[module.host].events);
end