Skip to content

Commit

Permalink
Improve logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jan 7, 2019
1 parent 932a66a commit a2ea9c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/extension/deviceConfigure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}')`);
}
});

Expand Down
2 changes: 1 addition & 1 deletion lib/zigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down

0 comments on commit a2ea9c5

Please sign in to comment.