changed slack error logging to include warn

This commit is contained in:
bill bittner 2017-11-07 07:14:38 -08:00
parent db63b3e9a9
commit 7589ad043d
2 changed files with 6 additions and 5 deletions

View file

@ -6,7 +6,7 @@ module.exports = (winston) => {
// add a transport for errors to slack
winston.add(winstonSlackWebHook, {
name : 'slack-errors-transport',
level : 'error',
level : 'warn',
webhookUrl: config.logging.slackWebHook,
channel : config.logging.slackErrorChannel,
username : 'spee.ch',
@ -21,9 +21,10 @@ module.exports = (winston) => {
iconEmoji : ':nerd_face:',
});
// send test message
winston.error('Slack error logging is online.');
winston.info('Slack info logging is online.');
winston.error('Slack "error" logging is online.');
winston.warn('Slack "warning" logging is online.');
winston.info('Slack "info" logging is online.');
} else {
winston.error('Slack logging is not enabled because no SLACK_WEB_HOOK env var provided.');
winston.warn('Slack logging is not enabled because no SLACK_WEB_HOOK env var provided.');
}
};

View file

@ -321,7 +321,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, D
case 1:
return resolve(result[0]);
default:
logger.error('more than one entry matches that name and claimID');
logger.warn(`more than one entry matches that name (${name}) and claimID (${claimId})`);
return resolve(result[0]);
}
})