crash now prints ns stack trace, workerscript now does the shouldLog check on its own, many ns function are way simpler.

This commit is contained in:
Olivier Gagnon
2021-03-11 03:02:05 -05:00
parent e2a353fc8a
commit cd972dabe3
12 changed files with 853 additions and 1637 deletions

View File

@@ -188,7 +188,17 @@ export class WorkerScript {
return (this.disableLogs.ALL == null && this.disableLogs[fn] == null);
}
log(txt: string): void {
log(func: string, txt: string): void {
if(this.shouldLog(func)) {
if(func !== "" && txt !== ""){
this.scriptRef.log(`${func}: ${txt}`);
} else {
this.scriptRef.log(func+txt);
}
}
}
print(txt: string): void {
this.scriptRef.log(txt);
}
}