From 6accb1ba83b843fa8d41a56f234379f9ce207038 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 12 Feb 2018 14:38:27 -0500 Subject: [PATCH] Add logging statements for ble endpoints for reset, restart and update --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2608b94..8184109 100644 --- a/index.js +++ b/index.js @@ -539,13 +539,18 @@ function bSequenceStop (obj, cb) { } function bReset (obj, cb) { - log.info(`reset`, { time : +new Date() }) + log.info(`reset`, { method: 'ble' }) intval.reset() setTimeout(cb, 10) } function bUpdate (obj, cb) { + log.info('update', { method : 'ble' }) exec('sh ./scripts/update.sh', (err, stdio, stderr) => { + if (err) { + log.error('update', err) + } + log.info('update', { stdio : stdio }) cb() setTimeout(() => { process.exit(0) @@ -553,6 +558,7 @@ function bUpdate (obj, cb) { }) } function bRestart (obj, cb) { + log.info('restart', { method : 'ble' }) cb() setTimeout(() => { process.exit(0)