1 function log(stack_frame_index
, obj
)
2 local info
= debug
.getinfo(stack_frame_index
, 'Sl')
4 if type(obj
) == 'string' then
9 love
.filesystem
.append('log', info
.short_src
..':'..info
.currentline
..': '..msg
..'\n')
12 -- for section delimiters we'll use specific Unicode box characters
13 function log_start(name
, stack_frame_index
)
14 if stack_frame_index
== nil then
17 log(stack_frame_index
, '\u{250c} ' .. name
)
19 function log_end(name
, stack_frame_index
)
20 if stack_frame_index
== nil then
23 log(stack_frame_index
, '\u{2518} ' .. name
)
26 function log_new(name
, stack_frame_index
)
27 if stack_frame_index
== nil then
30 log_end(name
, stack_frame_index
)
31 log_start(name
, stack_frame_index
)