1
0
Fork 0

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:
mfranz 2007-04-27 14:27:01 +00:00
parent 7c6e7e0e2b
commit 944e6a8548

View file

@ -72,7 +72,12 @@ interpolate = func {
setlistener = func {
if(isa(arg[0], props.Node)) { arg[0] = arg[0]._g; }
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;
}