Implement logger on back
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user