From d96b31ef4fbcb77d54a59951e97f5b619d9fb3e2 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 30 Apr 2021 15:27:18 +0000 Subject: [PATCH] update logging --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 86b77fe..0c06296 100644 --- a/index.js +++ b/index.js @@ -23,13 +23,13 @@ function instance(system) { instance.prototype.deviceInformation = function(key,data) { var self = this; - var changed = false; var oldHasData = self.has_data = true; self.log('debug','device information process key: ' + key) if (key == 'STREAM STATE') { - debug('Stream state: ', data); + + self.log('debug','data = ' + data); if (data['Status'] !== undefined) { self.streaming = data['Status']; @@ -121,14 +121,14 @@ instance.prototype.init_tcp = function() { self.log('debug',line.toString()) } - receivebuffer = receivebuffer.substr(offset); + receivebuffer = receivebuffer.substr(offset) }); self.socket.on('receiveline', function (line) { if (self.command === null && line.match(/:/) ) { self.command = line; - self.log('debug','command:' + line) + self.log('debug','command: ' + line) } else if (self.command !== null && line.length > 0) { self.stash.push(line.trim()); @@ -136,7 +136,7 @@ instance.prototype.init_tcp = function() { else if (line.length === 0 && self.command !== null) { var cmd = self.command.trim().split(/:/)[0]; - self.log('debug','COMMAND:', cmd); + self.log('debug','COMMAND: ' + cmd); var obj = {}; self.stash.forEach(function (val) {