core/modulemanager.lua

changeset 1069
034e345c0f8d
parent 929
b4f2ca7f6f00
child 1094
a619525fed5d
--- a/core/modulemanager.lua	Wed Apr 29 20:52:24 2009 +0100
+++ b/core/modulemanager.lua	Thu Apr 30 01:36:46 2009 +0100
@@ -123,6 +123,10 @@
 	-- 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 @@
 
 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)

mercurial