Comparison

util/logger.lua @ 1020:8bf71f8bd0d1

util.logger: Fix for attempting to call a table
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Apr 2009 20:29:38 +0100
parent 1015:9e31e9397cff
child 1523:841d61be198f
comparison
equal deleted inserted replaced
1017:6556a9db3822 1020:8bf71f8bd0d1
73 local num_level_handlers, num_source_handlers = #level_handlers, source_handlers and #source_handlers; 73 local num_level_handlers, num_source_handlers = #level_handlers, source_handlers and #source_handlers;
74 74
75 local logger = function (message, ...) 75 local logger = function (message, ...)
76 if source_handlers then 76 if source_handlers then
77 for i = 1,num_source_handlers do 77 for i = 1,num_source_handlers do
78 if source_handlers(source_name, level, message, ...) == false then 78 if source_handlers[i](source_name, level, message, ...) == false then
79 return; 79 return;
80 end 80 end
81 end 81 end
82 end 82 end
83 83