From c591737b93a9b0519a544714c18a92d34f5020a6 Mon Sep 17 00:00:00 2001 From: Fahad Faruqi Date: Fri, 21 Jun 2024 14:35:11 -0400 Subject: [PATCH] adding some more logging --- db.config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/db.config.ts b/db.config.ts index 28e6f15..34036ba 100644 --- a/db.config.ts +++ b/db.config.ts @@ -13,8 +13,11 @@ const client = new Client({ }); client.on("end", () => console.log("Client has disconnected")); -client.on("error", (err) => - console.error("Unexpected error on idle client", err), -); +client.on("error", (err) => console.error("Error:", err)); +client.on("notice", (msg) => console.warn("Notice:", msg)); +client.on("notification", (msg) => { + console.log("Notification:", msg); + console.log("Payload:", msg.payload); +}) export default client;