aboutsummaryrefslogtreecommitdiffstats
path: root/util/logger.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-11-04 08:42:18 +0000
committerMatthew Wild <mwild1@gmail.com>2010-11-04 08:42:18 +0000
commitfabbca99cfe5f3e153b8c6332d83890fa01aaa4a (patch)
tree47c83b14483651713ec2e2e551e3f6c48ad775b6 /util/logger.lua
parent7ef9dad63615c77003f399af41a1fb4d1ce7f418 (diff)
downloadprosody-fabbca99cfe5f3e153b8c6332d83890fa01aaa4a.tar.gz
prosody-fabbca99cfe5f3e153b8c6332d83890fa01aaa4a.zip
util.logger: Remove support for a global writer (setwriter) to try and balance the forces...
Diffstat (limited to 'util/logger.lua')
-rw-r--r--util/logger.lua14
1 files changed, 0 insertions, 14 deletions
diff --git a/util/logger.lua b/util/logger.lua
index e7095122..c3bf3992 100644
--- a/util/logger.lua
+++ b/util/logger.lua
@@ -17,7 +17,6 @@ local name_sinks, level_sinks = {}, {};
local name_patterns = {};
local make_logger;
-local outfunction = nil;
function init(name)
local log_debug = make_logger(name, "debug");
@@ -28,8 +27,6 @@ function init(name)
--name = nil; -- While this line is not commented, will automatically fill in file/line number info
local namelen = #name;
return function (level, message, ...)
- if outfunction then return outfunction(name, level, message, ...); end
-
if level == "debug" then
return log_debug(message, ...);
elseif level == "info" then
@@ -68,17 +65,6 @@ function make_logger(source_name, level)
return logger;
end
-function setwriter(f)
- local old_func = outfunction;
- if not f then outfunction = nil; return true, old_func; end
- local ok, ret = pcall(f, "logger", "info", "Switched logging output successfully");
- if ok then
- outfunction = f;
- ret = old_func;
- end
- return ok, ret;
-end
-
function reset()
for k in pairs(name_sinks) do name_sinks[k] = nil; end
for level, handler_list in pairs(level_sinks) do