changed slack error logging to include warn
This commit is contained in:
parent
db63b3e9a9
commit
7589ad043d
2 changed files with 6 additions and 5 deletions
|
@ -6,7 +6,7 @@ module.exports = (winston) => {
|
||||||
// add a transport for errors to slack
|
// add a transport for errors to slack
|
||||||
winston.add(winstonSlackWebHook, {
|
winston.add(winstonSlackWebHook, {
|
||||||
name : 'slack-errors-transport',
|
name : 'slack-errors-transport',
|
||||||
level : 'error',
|
level : 'warn',
|
||||||
webhookUrl: config.logging.slackWebHook,
|
webhookUrl: config.logging.slackWebHook,
|
||||||
channel : config.logging.slackErrorChannel,
|
channel : config.logging.slackErrorChannel,
|
||||||
username : 'spee.ch',
|
username : 'spee.ch',
|
||||||
|
@ -21,9 +21,10 @@ module.exports = (winston) => {
|
||||||
iconEmoji : ':nerd_face:',
|
iconEmoji : ':nerd_face:',
|
||||||
});
|
});
|
||||||
// send test message
|
// send test message
|
||||||
winston.error('Slack error logging is online.');
|
winston.error('Slack "error" logging is online.');
|
||||||
winston.info('Slack info logging is online.');
|
winston.warn('Slack "warning" logging is online.');
|
||||||
|
winston.info('Slack "info" logging is online.');
|
||||||
} else {
|
} 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.');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -321,7 +321,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, ARRAY, DECIMAL, D
|
||||||
case 1:
|
case 1:
|
||||||
return resolve(result[0]);
|
return resolve(result[0]);
|
||||||
default:
|
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]);
|
return resolve(result[0]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue