From c5c1f649a344cbfb158dbbb492b3b233923e3880 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 8 Feb 2018 16:02:18 -0500 Subject: [PATCH] Log reset requests as well (to differentiate intentional resets, restarts and updates in the logs) --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f706313..c7c21bb 100644 --- a/index.js +++ b/index.js @@ -248,6 +248,7 @@ function rStatus (req, res, next) { } function rReset (req, res, next) { + log.info'/reset', {time : +new Date()}) intval.reset() setTimeout(() => { res.send(intval._state) @@ -345,7 +346,7 @@ function rSequence (req, res, next) { } function rUpdate (req, res, next) { - log.info(`update`, { time : +new Date() }) + log.info(`/update`, { time : +new Date() }) exec('sh ./scripts/update.sh', (err, stdio, stderr) => { if (err) { log.error(err) @@ -361,7 +362,7 @@ function rUpdate (req, res, next) { } function rRestart (req, res, next) { - log.info(`restart`, { time : +new Date() }) + log.info(`/restart`, { time : +new Date() }) res.send({ success : true, action : 'restart' }) res.end() next()