webmcp
view framework/env/trace/debug.lua @ 438:ea8419658535
Another change to make <db_object>:try_save() work properly with "document_column"
(use "_col" proxy also for accessing self._col[primary_key.json_doc])
(use "_col" proxy also for accessing self._col[primary_key.json_doc])
author | jbe |
---|---|
date | Wed Jan 20 21:06:07 2016 +0100 (2016-01-20) |
parents | e00d11c12b68 |
children |
line source
1 --[[--
2 trace.debug(
3 value1, -- value to be converted to a string and included in the debug output
4 value2, -- another value to be converted to a string and included in the debug output
5 ...
6 )
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.
11 --]]--
13 function trace.debug(...)
14 if not trace._disabled then
15 local values = {}
16 for i = 1, select("#", ...) do
17 values[i] = tostring((select(i, ...)))
18 end
19 trace._new_entry{ type = "debug", message = table.concat(values, " ") }
20 end
21 end