Changeset

806:655293df3d7e

Merge waqas with waqas
author Matthew Wild <mwild1@gmail.com>
date Mon, 16 Feb 2009 15:44:23 +0000
parents 804:9bc1544c99b7 (current diff) 805:5fbbf34ef1c4 (diff)
children 814:f12b1ddd458d
files
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/util/logger.lua	Sun Feb 15 15:56:04 2009 +0000
+++ b/util/logger.lua	Mon Feb 16 15:44:23 2009 +0000
@@ -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