jbe/bsw@0: --[[-- jbe@350: trace.debug( jbe@350: value1, -- value to be converted to a string and included in the debug output jbe@350: value2, -- another value to be converted to a string and included in the debug output jbe@350: ... jbe@350: ) poelzi@36: jbe/bsw@0: jbe@350: 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: jbe/bsw@0: --]]-- jbe/bsw@0: poelzi@36: function trace.debug(...) jbe@41: if not trace._disabled then jbe@350: local values = {} jbe@350: for i = 1, select("#", ...) do jbe@350: values[i] = tostring((select(i, ...))) jbe@41: end jbe@350: trace._new_entry{ type = "debug", message = table.concat(values, " ") } poelzi@36: end jbe/bsw@0: end