webmcp
annotate framework/env/trace/debug.lua @ 569:5b19007574de
New argument active_link_attr for env.ui.paginate{...}
| author | jbe | 
|---|---|
| date | Wed Oct 13 17:21:44 2021 +0200 (2021-10-13) | 
| parents | e00d11c12b68 | 
| children | 
| rev | line source | 
|---|---|
| jbe/bsw@0 | 1 --[[-- | 
| jbe@350 | 2 trace.debug( | 
| jbe@350 | 3 value1, -- value to be converted to a string and included in the debug output | 
| jbe@350 | 4 value2, -- another value to be converted to a string and included in the debug output | 
| jbe@350 | 5 ... | 
| jbe@350 | 6 ) | 
| poelzi@36 | 7 | 
| jbe/bsw@0 | 8 | 
| jbe@350 | 9 This function can be used to include debug output in the trace log. Each argument is converted to a string (using tostring(...)) and all results are concatenated with a single space character between them. | 
| jbe/bsw@0 | 10 | 
| jbe/bsw@0 | 11 --]]-- | 
| jbe/bsw@0 | 12 | 
| poelzi@36 | 13 function trace.debug(...) | 
| jbe@41 | 14 if not trace._disabled then | 
| jbe@350 | 15 local values = {} | 
| jbe@350 | 16 for i = 1, select("#", ...) do | 
| jbe@350 | 17 values[i] = tostring((select(i, ...))) | 
| jbe@41 | 18 end | 
| jbe@350 | 19 trace._new_entry{ type = "debug", message = table.concat(values, " ") } | 
| poelzi@36 | 20 end | 
| jbe/bsw@0 | 21 end |