Software /
code /
prosody
Diff
core/loggingmanager.lua @ 6779:6236668da30a
core.*: Remove use of module() function
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:42:19 +0100 |
parent | 6719:0ef7a8c8fe8c |
child | 7006:93771dad3e05 |
line wrap: on
line diff
--- a/core/loggingmanager.lua Sat Feb 21 10:38:44 2015 +0100 +++ b/core/loggingmanager.lua Sat Feb 21 10:42:19 2015 +0100 @@ -27,7 +27,7 @@ _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 @@ 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 @@ 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; +}