diff options
author | Kim Alvefur <zash@zash.se> | 2015-02-21 10:42:19 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-02-21 10:42:19 +0100 |
commit | 075278ff98d8d5d8026b07b277cef08a474a6eec (patch) | |
tree | 71be0c3f872550dc6849e4cde3afd5ebfa68c1b9 /core/loggingmanager.lua | |
parent | 280f602e1a22ae54b8f06fad2ffd3ff630745317 (diff) | |
download | prosody-075278ff98d8d5d8026b07b277cef08a474a6eec.tar.gz prosody-075278ff98d8d5d8026b07b277cef08a474a6eec.zip |
core.*: Remove use of module() function
Diffstat (limited to 'core/loggingmanager.lua')
-rw-r--r-- | core/loggingmanager.lua | 11 |
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; +} |