changeDebug method added. see #115
This commit is contained in:
parent
5dfd5925b0
commit
9fa8bc50c4
1 changed files with 5 additions and 1 deletions
|
|
@ -26,6 +26,10 @@ export class taLogger {
|
||||||
this.prefix = "[ThunderAI Logger | " + prefix + "] ";
|
this.prefix = "[ThunderAI Logger | " + prefix + "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeDebug(do_debug) {
|
||||||
|
this.do_debug = do_debug;
|
||||||
|
}
|
||||||
|
|
||||||
log(msg, do_debug = -1) {
|
log(msg, do_debug = -1) {
|
||||||
if(do_debug !== -1) this.do_debug = do_debug;
|
if(do_debug !== -1) this.do_debug = do_debug;
|
||||||
if(this.do_debug === true) console.log(this.prefix + msg);
|
if(this.do_debug === true) console.log(this.prefix + msg);
|
||||||
|
|
@ -37,5 +41,5 @@ export class taLogger {
|
||||||
|
|
||||||
warn(msg) {
|
warn(msg) {
|
||||||
console.warn(this.prefix + msg);
|
console.warn(this.prefix + msg);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Loading…
Reference in a new issue