Software /
code /
prosody
Comparison
util/logger.lua @ 259:1485d272400d
Some more logging fixes
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 02:41:37 +0000 |
parent | 147:ccebb2720741 |
child | 262:8c73fb2ff4a2 |
comparison
equal
deleted
inserted
replaced
258:a93ccd84db83 | 259:1485d272400d |
---|---|
11 if not name then | 11 if not name then |
12 local inf = debug.getinfo(3, 'Snl'); | 12 local inf = debug.getinfo(3, 'Snl'); |
13 level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline; | 13 level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline; |
14 end | 14 end |
15 if ... then | 15 if ... then |
16 print(level, format(message, ...)); | 16 print(name, level, format(message, ...)); |
17 else | 17 else |
18 print(level, message); | 18 print(name, level, message); |
19 end | 19 end |
20 end | 20 end |
21 end | 21 end |
22 | 22 |
23 return _M; | 23 return _M; |