From a2ea9c548fb882b45030c1fbe496f5033d31ef43 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Mon, 7 Jan 2019 18:18:14 +0100 Subject: [PATCH] Improve logging. --- lib/extension/deviceConfigure.js | 5 +++-- lib/zigbee.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/extension/deviceConfigure.js b/lib/extension/deviceConfigure.js index 3d82e4eb..bf216b83 100644 --- a/lib/extension/deviceConfigure.js +++ b/lib/extension/deviceConfigure.js @@ -32,13 +32,14 @@ class DeviceConfigure { if (!this.configured.includes(ieeeAddr) && mappedDevice.configure) { const friendlyName = settings.getDevice(ieeeAddr) ? settings.getDevice(ieeeAddr).friendly_name : 'unknown'; + logger.debug(`Configuring ${friendlyName} (${ieeeAddr}) ...`); // Call configure function of this device. mappedDevice.configure(ieeeAddr, this.zigbee.shepherd, this.zigbee.getCoordinator(), (ok, msg) => { if (ok) { - logger.info(`Succesfully configured ${friendlyName} ${ieeeAddr}`); + logger.info(`Succesfully configured ${friendlyName} (${ieeeAddr})`); } else { - logger.error(`Failed to configure ${friendlyName} ${ieeeAddr} ('${msg}')`); + logger.error(`Failed to configure ${friendlyName} (${ieeeAddr}) ('${msg}')`); } }); diff --git a/lib/zigbee.js b/lib/zigbee.js index deada02a..4936bb2e 100644 --- a/lib/zigbee.js +++ b/lib/zigbee.js @@ -92,7 +92,7 @@ class Zigbee { // Mount cieApp this.shepherd.mount(cieApp, (err, epId) => { if (!err) { - logger.debug(`Mounted the cieApp (epId {epId})`); + logger.debug(`Mounted the cieApp (epId ${epId})`); } else { logger.error(`Failed to mount the cieApp`); }