aboutsummaryrefslogtreecommitdiffstats
path: root/core/loggingmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
committerKim Alvefur <zash@zash.se>2015-08-20 13:05:22 +0200
commit6ef7c4d80892f486d71e660b054bdfdb993c8528 (patch)
tree103fd7d9396b60b9f76071a009c54d3ca9d35744 /core/loggingmanager.lua
parenta9029bd099734436154fc4e794d3b958e54d1943 (diff)
parentd32f36b2817739d7f8d5f1208a3009b7be379562 (diff)
downloadprosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.tar.gz
prosody-6ef7c4d80892f486d71e660b054bdfdb993c8528.zip
Merge 0.10->trunk
Diffstat (limited to 'core/loggingmanager.lua')
-rw-r--r--core/loggingmanager.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua
index 57ed8687..e21e3901 100644
--- a/core/loggingmanager.lua
+++ b/core/loggingmanager.lua
@@ -27,7 +27,7 @@ local prosody = prosody;
_G.log = logger.init("general");
-module "loggingmanager"
+local _ENV = nil;
-- The log config used if none specified in the config file (see reload_logging for initialization)
local default_logging;
@@ -136,7 +136,7 @@ function get_levels(criteria, set)
end
-- Initialize config, etc. --
-function reload_logging()
+local function reload_logging()
local old_sink_types = {};
for name, sink_maker in pairs(log_sink_types) do
@@ -267,10 +267,13 @@ function log_sink_types.file(sink_config)
end;
end
-function register_sink_type(name, sink_maker)
+local function register_sink_type(name, sink_maker)
local old_sink_maker = log_sink_types[name];
log_sink_types[name] = sink_maker;
return old_sink_maker;
end
-return _M;
+return {
+ reload_logging = reload_logging;
+ register_sink_type = register_sink_type;
+}