From 386a9de4d89124a3066e6fa5092daa1b5d768f89 Mon Sep 17 00:00:00 2001 From: Mark Wilson Date: Sat, 10 Oct 2015 15:00:06 -0700 Subject: [PATCH] Env variable to control logger verbosity --- logger.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/logger.js b/logger.js index 849dfbb..ebcfb1b 100644 --- a/logger.js +++ b/logger.js @@ -2,5 +2,7 @@ "use strict"; module.exports.log = function(str) { - console.log(new Date() + ' ' + str); + if (process.env['MINIMED_CONNECT_VERBOSE']) { + console.log(new Date() + ' ' + str); + } }; diff --git a/package.json b/package.json index 2f26790..321bdab 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "main": "index.js", "scripts": { - "start": "node run.js" + "start": "MINIMED_CONNECT_VERBOSE=true node run.js" }, "license": "MIT", "dependencies": {