aboutsummaryrefslogtreecommitdiffstats
path: root/core/loggingmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
committerKim Alvefur <zash@zash.se>2015-02-21 10:42:19 +0100
commit27265c20e21d071bc96171da9b8707aec6ea669b (patch)
tree71be0c3f872550dc6849e4cde3afd5ebfa68c1b9 /core/loggingmanager.lua
parent359ca86e382251845aa294baac60d9f8f58e1fe1 (diff)
downloadprosody-27265c20e21d071bc96171da9b8707aec6ea669b.tar.gz
prosody-27265c20e21d071bc96171da9b8707aec6ea669b.zip
core.*: Remove use of module() function
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;
+}