comparison mod_log_events/mod_log_events.lua @ 1638:9276473ee5be

mod_log_events: Module to log all events on the server/host
author Matthew Wild <mwild1@gmail.com>
date Tue, 31 Mar 2015 12:44:28 +0100
parents
children 0e008f36a91c
comparison
equal deleted inserted replaced
1635:b877b75eb973 1638:9276473ee5be
1 module:set_global();
2
3 local helpers = require "util.helpers";
4
5 helpers.log_events(prosody.events, "global", module._log);
6
7 function module.add_host(module)
8 helpers.log_events(prosody.hosts[module.host].events, module.host, module._log);
9 end
10
11 function module.remove_host(module)
12 helpers.revert_log_events(prosody.hosts[module.host].events);
13 end