3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Add custom logger. Fix a bunch of errors. Optimize imports.

This commit is contained in:
Dragory 2020-07-22 22:56:21 +03:00
parent 0dae54745d
commit 1064a1ca46
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
89 changed files with 198 additions and 229 deletions

23
backend/src/logger.ts Normal file
View file

@ -0,0 +1,23 @@
// tslint-disable:no-console
export const logger = {
info(...args: Parameters<typeof console.log>) {
console.log("[INFO]", ...args);
},
warn(...args: Parameters<typeof console.warn>) {
console.warn("[WARN]", ...args);
},
error(...args: Parameters<typeof console.error>) {
console.error("[ERROR]", ...args);
},
debug(...args: Parameters<typeof console.log>) {
console.log("[DEBUG]", ...args);
},
log(...args: Parameters<typeof console.log>) {
console.log(...args);
},
};