mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
Improve logging.
This commit is contained in:
parent
932a66a5c4
commit
a2ea9c548f
@ -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}')`);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user