Merge pull request #5 from PascalPrecht/fix/logger

Fix Embark logger usage
This commit is contained in:
semuelle 2020-01-23 01:23:58 +01:00 committed by GitHub
commit 2cb543f868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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;