Improvements (#124)

* Improvements

* Add inspect to dev:backend

* Skip debug log at the beginning
This commit is contained in:
Louis Lam
2023-11-21 18:51:38 +08:00
committed by GitHub
parent e95ef66ca1
commit 31726315c3
5 changed files with 82 additions and 49 deletions

View File

@@ -103,6 +103,10 @@ class Logger {
* @param level Log level. One of INFO, WARN, ERROR, DEBUG or can be customized.
*/
log(module: string, msg: unknown, level: string) {
if (level === "DEBUG" && !isDev) {
return;
}
if (this.hideLog[level] && this.hideLog[level].includes(module.toLowerCase())) {
return;
}