From 486f334b4a0402bef344f8f4eeb863f8c6584d01 Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Sun, 4 Feb 2024 13:38:35 +0200 Subject: [PATCH] changing the logs --- dist/index.js | 3 ++- src/index.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 84863f9..35af880 100644 --- a/dist/index.js +++ b/dist/index.js @@ -39,9 +39,10 @@ class App { else { console.log("No new games were Added!"); } + this.writeLog('Successfully ran project'); } catch (error) { - console.error("Error in cron job:", error.message); + this.writeLog("Error in cron job:" + error.message); } finally { this.writeLog('END CRON JOB'); // Log when the cron job ends diff --git a/src/index.ts b/src/index.ts index e3e2c8c..8748234 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,8 +45,9 @@ class App { } else { console.log("No new games were Added!"); } + this.writeLog('Successfully ran project'); } catch (error) { - console.error("Error in cron job:", error.message); + this.writeLog("Error in cron job:" + error.message); } finally { this.writeLog('END CRON JOB'); // Log when the cron job ends }