Skip to content

Commit

Permalink
SG debug to include SG name and version (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamigo committed Feb 7, 2019
1 parent c75cc20 commit 9953fd0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/heartbeat/utils.js
Expand Up @@ -161,7 +161,9 @@ function addGenerators(res) {
err.message);
}

debug('Generator added: %O', sanitize(g, ['token', 'context']));
debug('Generator added: %O (%s v%s)',
sanitize(g, ['token', 'context']), g.generatorTemplate.name,
g.generatorTemplate.version);
});
} else {
debug('No generators to add.');
Expand Down Expand Up @@ -216,7 +218,8 @@ function updateGenerators(res) {
g.refocus = { url: cr.url };
if (cr.proxy) g.refocus.proxy = cr.proxy;

Object.keys(g).forEach((key) => config.generators[g.name][key] = g[key]);
Object.keys(g).forEach((key) =>
config.generators[g.name][key] = g[key]);

// Repeaters cannot be updated--stop old ones and create new ones.
try {
Expand All @@ -229,7 +232,9 @@ function updateGenerators(res) {
err.message);
}

debug('Generator updated: %O', sanitize(g, ['token', 'context']));
debug('Generator updated: %O (%s v%s)',
sanitize(g, ['token', 'context']), g.generatorTemplate.name,
g.generatorTemplate.version);
});
} else {
debug('No generators to update.');
Expand Down

0 comments on commit 9953fd0

Please sign in to comment.