Added logging with configurable levels to make debugging easier.

This commit is contained in:
n1474335 2017-12-28 18:17:38 +00:00
parent 124ff83206
commit d079420d46
17 changed files with 88 additions and 18 deletions

View file

@ -111,6 +111,7 @@ Dish.enumLookup = function(typeEnum) {
* @param {number} type - The data type of value, see Dish enums.
*/
Dish.prototype.set = function(value, type) {
log.debug("Dish type: " + Dish.enumLookup(type));
this.value = value;
this.type = type;
@ -141,6 +142,8 @@ Dish.prototype.get = function(type) {
* @param {number} toType - The data type of value, see Dish enums.
*/
Dish.prototype.translate = function(toType) {
log.debug(`Translating Dish from ${Dish.enumLookup(this.type)} to ${Dish.enumLookup(toType)}`);
// Convert data to intermediate byteArray type
switch (this.type) {
case Dish.STRING: