diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 8b137891..e0278fdb 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1 @@ - +- Ensure device apikey in already provisioned device (iota-node-lib#1430) diff --git a/lib/iotaUtils.js b/lib/iotaUtils.js index b6fd2cde..2b2df76e 100644 --- a/lib/iotaUtils.js +++ b/lib/iotaUtils.js @@ -147,7 +147,9 @@ function findOrCreate(deviceId, transport, group, callback) { 'apikey' in group && group.apikey !== undefined ) { - logger.info(context, 'Update provisioned device %j with measure/group apikey %j', device, group.apikey); + config + .getLogger() + .info(context, 'Update provisioned device %j with measure/group apikey %j', device, group.apikey); device.apikey = group.apikey; // group apikey is the same of current measure apikey iotAgentLib.updateRegister(device, function (error, device) { callback(error, device, group);