slack and rocket.chat use the primary base url

env var to show time logger
This commit is contained in:
LouisLam
2021-10-07 17:39:58 +08:00
parent b69550f5b9
commit e5f6d7f047
9 changed files with 93 additions and 36 deletions

View File

@@ -86,7 +86,7 @@ export class TimeLogger {
}
print(name: string) {
if (isDev) {
if (isDev && process && process.env.TIMELOGGER === "1") {
console.log(name + ": " + (dayjs().valueOf() - this.startTime) + "ms")
}
}
@@ -123,3 +123,7 @@ export function genSecret(length = 64) {
}
return secret;
}
export function getMonitorRelativeURL(id: string) {
return "/dashboard/" + id;
}