1
0
Fork 0

allow printlog() to be used with variable arg list (like print()):

printlog("warn", "Monty", "Burns");
This commit is contained in:
mfranz 2006-02-17 22:05:32 +00:00
parent 003ae0986f
commit dc6ab58eaf

View file

@ -100,5 +100,8 @@ defined = func(sym) {
_ = {}; _ = {};
_.dbg_types = { none:0, bulk:1, debug:2, info:3, warn:4, alert:5 }; _.dbg_types = { none:0, bulk:1, debug:2, info:3, warn:4, alert:5 };
_.log_level = _.dbg_types[getprop("/sim/logging/priority")]; _.log_level = _.dbg_types[getprop("/sim/logging/priority")];
printlog = func(t, m) { if(_.dbg_types[t] >= _.log_level) { print(m) } } printlog = func(level, text...) {
if(_.dbg_types[level] >= _.log_level) { call(print, text) }
}