Improved log message when networks do not match

Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
This commit is contained in:
Miguel Casqueira 2020-09-30 20:29:56 -04:00
parent d5d870bdc2
commit edf23871d9

View File

@ -742,6 +742,15 @@ export class Service {
}
sameNetworks =
sameNetworks && this.isSameNetwork(this.config.networks[name], network);
if (!sameNetworks) {
const currentNetwork = this.config.networks[name];
const newNetwork = network;
log.debug(
`Networks do not match!\nCurrent network: \n${JSON.stringify(
currentNetwork,
)}\nNew network: \n${JSON.stringify(newNetwork)}`,
);
}
});
// Check the configuration for any changes