diff --git a/config/slackConfig.js b/config/slackConfig.js index 74227bbd..84ab3376 100644 --- a/config/slackConfig.js +++ b/config/slackConfig.js @@ -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.'); } }; diff --git a/models/claim.js b/models/claim.js index 64a54b02..7145e9e0 100644 --- a/models/claim.js +++ b/models/claim.js @@ -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]); } })