webmcp

annotate framework/env/trace/debug.lua @ 41:0bbfee4d4aed

New functions trace.disable() and trace.is_disabled()
author jbe
date Sat Oct 16 17:51:18 2010 +0200 (2010-10-16)
parents 3480a11da8e8
children e00d11c12b68
rev   line source
jbe/bsw@0 1 --[[--
poelzi@36 2 trace.debug(...)
poelzi@38 3 ... -- messages to be inserted into the trace log
poelzi@36 4
jbe/bsw@0 5
jbe/bsw@0 6 This function can be used to include debug output in the trace log.
jbe/bsw@0 7
jbe/bsw@0 8 --]]--
jbe/bsw@0 9
poelzi@36 10 function trace.debug(...)
jbe@41 11 if not trace._disabled then
jbe@41 12 local message = ""
jbe@41 13 local arg = {...}
jbe@41 14 for i= 1,#arg,1 do
jbe@41 15 message = message..tostring(arg[i]).." "
jbe@41 16 end
jbe@41 17 trace._new_entry{ type = "debug", message = message }
poelzi@36 18 end
jbe/bsw@0 19 end

Impressum / About Us