This commit is contained in:
TheNetsky
2023-09-25 12:16:40 +02:00
parent 0a675dd6e0
commit c802492f18
27 changed files with 2115 additions and 1 deletions

18
src/util/Logger.ts Normal file
View File

@@ -0,0 +1,18 @@
export function log(title: string, message: string, type?: 'log' | 'warn' | 'error') {
const currentTime = new Date().toISOString()
switch (type) {
case 'warn':
console.warn(`[${currentTime}] [WARN] [${title}] ${message}`)
break
case 'error':
console.error(`[${currentTime}] [ERROR] [${title}] ${message}`)
break
default:
console.log(`[${currentTime}] [LOG] [${title}] ${message}`)
break
}
}