in debug levels "debug" and "bulk" output listener id, file name, and
line-number for every setlistener() wrapper call. This allows to identify listeners later by their id.
This commit is contained in:
parent
7c6e7e0e2b
commit
944e6a8548
1 changed files with 6 additions and 1 deletions
|
@ -72,7 +72,12 @@ interpolate = func {
|
||||||
setlistener = func {
|
setlistener = func {
|
||||||
if(isa(arg[0], props.Node)) { arg[0] = arg[0]._g; }
|
if(isa(arg[0], props.Node)) { arg[0] = arg[0]._g; }
|
||||||
elsif(typeof(arg[0]) != "scalar") { return; }
|
elsif(typeof(arg[0]) != "scalar") { return; }
|
||||||
_setlistener(arg[0], arg[1], size(arg) > 2 ? arg[2] : 0);
|
var id = _setlistener(arg[0], arg[1], size(arg) > 2 ? arg[2] : 0);
|
||||||
|
if(__.log_level <= 2) {
|
||||||
|
var c = caller(1);
|
||||||
|
print(sprintf("setting listener #%d in %s, line %s", id, c[2], c[3]))
|
||||||
|
}
|
||||||
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue