always logging errors and warnings
This commit is contained in:
parent
3f2862a571
commit
48ceea085d
1 changed files with 3 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ export class taLogger {
|
|||
|
||||
constructor(prefix, do_debug) {
|
||||
this.do_debug = do_debug;
|
||||
this.prefix = "[ThunderAI Logger |" + prefix + "] ";
|
||||
this.prefix = "[ThunderAI Logger | " + prefix + "] ";
|
||||
}
|
||||
|
||||
log(msg, do_debug = -1) {
|
||||
|
|
@ -32,12 +32,10 @@ export class taLogger {
|
|||
}
|
||||
|
||||
error(msg, do_debug = -1) {
|
||||
if(do_debug !== -1) this.do_debug = do_debug;
|
||||
if(this.do_debug === true) console.error(this.prefix + msg);
|
||||
console.error(this.prefix + msg);
|
||||
}
|
||||
|
||||
warn(msg, do_debug = -1) {
|
||||
if(do_debug !== -1) this.do_debug = do_debug;
|
||||
if(this.do_debug === true) console.warn(this.prefix + msg);
|
||||
console.warn(this.prefix + msg);
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue