webmcp
changeset 36:5380305a3d51
allow multiple arguments to trace.debug
you can now write trace.debug("bla", 2, ...)
you can now write trace.debug("bla", 2, ...)
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sat Oct 09 00:57:26 2010 +0200 (2010-10-09) |
parents | 81dfcfd960ed |
children | fb7b7ac6d560 |
files | framework/env/trace/debug.lua |
line diff
1.1 --- a/framework/env/trace/debug.lua Thu Oct 07 00:28:47 2010 +0200 1.2 +++ b/framework/env/trace/debug.lua Sat Oct 09 00:57:26 2010 +0200 1.3 @@ -1,12 +1,14 @@ 1.4 --[[-- 1.5 -trace.debug( 1.6 - message -- message to be inserted into the trace log 1.7 -) 1.8 +trace.debug(...) 1.9 + arg -- messages to be inserted into the trace log 1.10 + 1.11 1.12 This function can be used to include debug output in the trace log. 1.13 1.14 --]]-- 1.15 1.16 -function trace.debug(message) 1.17 - trace._new_entry{ type = "debug", message = tostring(message) } 1.18 +function trace.debug(...) 1.19 + for i,message in ipairs(arg) do 1.20 + trace._new_entry{ type = "debug", message = tostring(message) } 1.21 + end 1.22 end