aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index a1d3bef3..cc48c2f6 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -123,6 +123,10 @@ function load(host, module_name, config)
-- Use modified host, if the module set one
modulemap[api_instance.host][module_name] = pluginenv;
+ if api_instance.host == "*" and host ~= "*" then
+ api_instance:set_global();
+ end
+
return true;
end
@@ -260,6 +264,10 @@ end
function api:set_global()
self.host = "*";
+ -- Update the logger
+ local _log = logger.init("mod_"..self.name);
+ self.log = function (self, ...) return _log(...); end;
+ self._log = _log;
end
local function _add_handler(module, origin_type, tag, xmlns, handler)