# HG changeset patch
# User Waqas Hussain <waqas20@gmail.com>
# Date 1234534476 -18000
# Node ID 5fbbf34ef1c43b6507f5985a18e581093d651aa2
# Parent  a4be1d80775c4f9cfb65d8b6890356cdf7577126
Logging format improvement

diff -r a4be1d80775c -r 5fbbf34ef1c4 util/logger.lua
--- a/util/logger.lua	Thu Feb 12 18:23:00 2009 +0500
+++ b/util/logger.lua	Fri Feb 13 19:14:36 2009 +0500
@@ -33,16 +33,11 @@
 
 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