From 672a0cac4fcc45a9f6ac5abd5fea3e5def5c6483 Mon Sep 17 00:00:00 2001 From: Jakub Date: Sat, 2 Mar 2019 14:04:52 +0100 Subject: [PATCH] Hide network_key from debug output (#1169) * Hide network_key from debug output There's no need to print this key. * strings must use singlequote * Update zigbee.js --- lib/zigbee.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/zigbee.js b/lib/zigbee.js index aff2d6c18..1999571eb 100644 --- a/lib/zigbee.js +++ b/lib/zigbee.js @@ -5,6 +5,7 @@ const data = require('./util/data'); const utils = require('./util/utils'); const ZigbeeQueue = require('./util/zigbeeQueue'); const cieApp = require('./zapp/cie'); +const objectAssignDeep = require('object-assign-deep'); const zclId = require('zcl-id'); const advancedSettings = settings.get().advanced; @@ -32,7 +33,10 @@ const defaultCfg = { disDefaultRsp: 0, }; -logger.debug(`Using zigbee-shepherd with settings: '${JSON.stringify(shepherdSettings)}'`); +// Don't print network key. +const shepherdSettingsLog = objectAssignDeep.noMutate(shepherdSettings); +shepherdSettingsLog.net.precfgkey = 'HIDDEN'; +logger.debug(`Using zigbee-shepherd with settings: '${JSON.stringify(shepherdSettingsLog)}'`); class Zigbee { constructor() {