Comparison

tests/util/logger.lua @ 3540:bc139431830b

Monster whitespace commit (beware the whitespace monster).
author Waqas Hussain <waqas20@gmail.com>
date Sat, 16 Oct 2010 23:00:42 +0500
parent 2923:b7049746bd29
child 5776:bd0ff8ae98a8
comparison
equal deleted inserted replaced
3539:8bbd965267b2 3540:bc139431830b
31 if level == "debug" or level == "info" then return; end 31 if level == "debug" or level == "info" then return; end
32 if not name then 32 if not name then
33 local inf = debug.getinfo(3, 'Snl'); 33 local inf = debug.getinfo(3, 'Snl');
34 level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline; 34 level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline;
35 end 35 end
36 if ... then 36 if ... then
37 print(name, getstring(logstyles[level], level), format(message, ...)); 37 print(name, getstring(logstyles[level], level), format(message, ...));
38 else 38 else
39 print(name, getstring(logstyles[level], level), message); 39 print(name, getstring(logstyles[level], level), message);
40 end 40 end
41 end 41 end