Implement logger on back

This commit is contained in:
Alexis Faizeau
2021-11-08 17:44:44 +01:00
parent c573e9fbaf
commit 6a195be814
17 changed files with 260 additions and 76 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { ClientOpts, createClient, RedisClient } from "redis";
import { REDIS_HOST, REDIS_PASSWORD, REDIS_PORT } from "../Enum/EnvironmentVariable";
import log from "./Logger";
let redisClient: RedisClient | null = null;
@@ -16,7 +17,7 @@ if (REDIS_HOST !== undefined) {
redisClient = createClient(config);
redisClient.on("error", (err) => {
console.error("Error connecting to Redis:", err);
log.error("Error connecting to Redis:", err);
});
}