chore: add performance logger

This commit is contained in:
李华桥
2023-11-10 00:25:15 +08:00
committed by LongYinan
parent 927a6489f9
commit 09c3a8828f
10 changed files with 79 additions and 3 deletions

View File

@@ -58,4 +58,9 @@ export class DebugLogger {
this._debug.log = console[level].bind(console);
this._debug(`[${level.toUpperCase()}] ${message}`, ...args);
}
namespace(extra: string) {
const currentNamespace = this._debug.namespace;
return new DebugLogger(`${currentNamespace}:${extra}`);
}
}