From 1d2a5424483bac9e5c47e871e2bee23a4a37f1a7 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Sun, 1 Sep 2024 09:45:00 -0400 Subject: [PATCH] better debug messages --- backend/sys_stats.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/sys_stats.js b/backend/sys_stats.js index d2347ef..bde70bc 100644 --- a/backend/sys_stats.js +++ b/backend/sys_stats.js @@ -50,8 +50,10 @@ exports.initStats = async function () { try { talkgroupStats = JSON.parse(fileContents); } catch (error) { - console.error("Error parsing JSON data:", error); + console.error("Talkgroup Stats - Error parsing JSON data:", error); } + } else { + console.error("Talkgroup Stats File not found: " + filePath); } // Check if the decodeErrorsFreq.json file exists @@ -64,9 +66,12 @@ exports.initStats = async function () { try { decodeErrorsFreq = JSON.parse(fileContents); } catch (error) { - console.error("Error parsing JSON data:", error); + console.error("Decode Errors - Error parsing JSON data:", error); } + } else { + console.error("Decode Errors File not found: " + decodeErrorsFreqPath); } + /* for await (const item of SystemStat.find()) { const obj = item.toObject();