From 7f48045bbd6b8d62e1e1f011a75f857fe2fa0103 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 25 Sep 2017 23:25:34 -0400 Subject: [PATCH] Log with appropriate tagging --- index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 77d6ca8..4356b13 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ 'use strict' const restify = require('restify') -const logger = require('winston') +const log = require('./lib/log')('main') const fs = require('fs') const ble = require('./lib/blootstrap') @@ -25,18 +25,19 @@ function createServer () { app.post('/sequence', () => {}) app.get('/status', rStatus) app.listen(PORT, () => { - console.log(`${APPNAME} listening on port ${PORT}!`) + log.info('server', { name : APPNAME, port : PORT }) }) } function rFrame (req, res, next) { + intval.frame() res.send({}) return next() } function rStatus (req, res, next) { const obj = intval.status() - res.send({}) + res.send(obj) return next() }