Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthernMan54 committed Jun 9, 2020
1 parent a041a35 commit be131ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 4 additions & 4 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"refresh": {
"title": "Refresh Token",
"default": 900,
"default": 60,
"type": "integer",
"minimum": 60,
"maximum": 3000,
"description": "Data polling interval in seconds, defaults to 15 minutes."
"minimum": 30,
"maximum": 3600,
"description": "Data polling interval in seconds, defaults to 1 minute."
},
"storage": {
"title": "Storage",
Expand Down
13 changes: 1 addition & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,7 @@ function tccPlatform(log, config, api) {
// Enable config based DEBUG logging enable
this.debug = config['debug'] || false;
if (this.debug) {
debug.enable = true;
// let debugEnable = require('debug');
let namespaces = debug.disable();

// this.log("DEBUG-1", namespaces);
if (namespaces) {
namespaces = namespaces + ',alexa*';
} else {
namespaces = 'alexa*';
}
// this.log("DEBUG-2", namespaces);
debug.enable(namespaces);
debug.enabled = true;
}

if (api) {
Expand Down
3 changes: 3 additions & 0 deletions lib/tcc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ module.exports = {
};

function tcc(options, callback) {
if (options.debug) {
debug.enabled = true;
}
debug("Setting up TCC component");
this._username = options.username;
this._password = options.password;
Expand Down

0 comments on commit be131ef

Please sign in to comment.