Merge pull request #5 from PascalPrecht/fix/logger
Fix Embark logger usage
This commit is contained in:
commit
2cb543f868
8
mythx.js
8
mythx.js
|
@ -90,7 +90,7 @@ async function getStatus(uuid, embark) {
|
|||
|
||||
try {
|
||||
const results = await armletClient.getIssues(uuid);
|
||||
return ghettoReport(embark.logger.info, results);
|
||||
return ghettoReport(embark.logger, results);
|
||||
} catch (err) {
|
||||
embark.logger.warn(err);
|
||||
return 1;
|
||||
|
@ -172,13 +172,13 @@ function ghettoReport(logger, results) {
|
|||
});
|
||||
|
||||
if (issuesCount === 0) {
|
||||
logger('No issues found');
|
||||
logger.info('No issues found');
|
||||
return 0;
|
||||
}
|
||||
for (const group of results) {
|
||||
logger(group.sourceList.join(', ').underline);
|
||||
logger.info(group.sourceList.join(', ').underline);
|
||||
for (const issue of group.issues) {
|
||||
logger(yaml.safeDump(issue, {'skipInvalid': true}));
|
||||
logger.info(yaml.safeDump(issue, {'skipInvalid': true}));
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue