From 596f3355bfddf40346fffb175c84339b384abdc3 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 3 Jun 2025 13:33:08 +0000 Subject: [PATCH] chore(logging): turn off logToDB since it was blowing up and hiding real errors in noise. --- src/db/databaseUtil.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/db/databaseUtil.ts b/src/db/databaseUtil.ts index f8079c97..d3ac8109 100644 --- a/src/db/databaseUtil.ts +++ b/src/db/databaseUtil.ts @@ -137,10 +137,10 @@ export async function logToDb(message: string): Promise { try { // Try to insert first, if it fails due to UNIQUE constraint, update instead - await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ - nowKey, - message, - ]); + // await platform.dbExec("INSERT INTO logs (date, message) VALUES (?, ?)", [ + // nowKey, + // message, + // ]); // Clean up old logs (keep only last 7 days) - do this less frequently // Only clean up if the date is different from the last cleanup @@ -148,9 +148,9 @@ export async function logToDb(message: string): Promise { const sevenDaysAgo = new Date( new Date().getTime() - 7 * 24 * 60 * 60 * 1000, ); - await platform.dbExec("DELETE FROM logs WHERE date < ?", [ - sevenDaysAgo.toDateString(), - ]); + // await platform.dbExec("DELETE FROM logs WHERE date < ?", [ + // sevenDaysAgo.toDateString(), + // ]); lastCleanupDate = todayKey; } } catch (error) {