aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-02-16 15:44:23 +0000
committerMatthew Wild <mwild1@gmail.com>2009-02-16 15:44:23 +0000
commitd0163230f0ac07af614f5f042501fb643a0af94f (patch)
treec47e4ee161ad34f46290cbf8de41fae3b8d09b82 /util
parent82d6c67565c280f75361809bf743c77f9c6f61b1 (diff)
parent4d0953b52bb26d362f66acaf620ea90543e6bbd6 (diff)
downloadprosody-d0163230f0ac07af614f5f042501fb643a0af94f.tar.gz
prosody-d0163230f0ac07af614f5f042501fb643a0af94f.zip
Merge waqas with waqas
Diffstat (limited to 'util')
-rw-r--r--util/logger.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/util/logger.lua b/util/logger.lua
index d76e48f3..791e222b 100644
--- a/util/logger.lua
+++ b/util/logger.lua
@@ -33,16 +33,11 @@ local outfunction = nil;
function init(name)
--name = nil; -- While this line is not commented, will automatically fill in file/line number info
- sourcewidth = math_max(#name+2, sourcewidth);
local namelen = #name;
return function (level, message, ...)
- if not name then
- local inf = debug.getinfo(3, 'Snl');
- level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline;
- end
-
if outfunction then return outfunction(name, level, message, ...); end
+ sourcewidth = math_max(#name+2, sourcewidth);
if ... then
io_write(name, rep(" ", sourcewidth-namelen), getstring(logstyles[level], level), "\t", format(message, ...), "\n");
else