From c4afd398dc8c65c8b768bd1d5df657fc789e8a68 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:56 +0200 Subject: [PATCH] Added timestamp to watch mode status log. --- src/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 6161d60..c0ad0a5 100644 --- a/src/app.js +++ b/src/app.js @@ -4,6 +4,7 @@ const config = require('config'); const Snoowrap = require('snoowrap'); const exiftool = require('node-exiftool'); const exiftoolBin = require('dist-exiftool'); +const { format } = require('date-fns'); require('array.prototype.flatten').shim(); @@ -40,7 +41,7 @@ function fetchSavePosts(userPosts, ep) { async function initApp() { function watch() { - console.log(`Watch-mode enabled, checking for new posts ${config.fetch.watch.interval} minutes from now.`); + console.log(`[${format(new Date(), 'YYYY-MM-DD HH:mm:ss')}] Watch-mode enabled, checking for new posts ${config.fetch.watch.interval} minutes from now.`); setTimeout(initApp, Math.ceil(config.fetch.watch.interval) * 1000 * 60); }