Upload refactor #242

Merged
bones7242 merged 24 commits from upload-refactor into master 2017-11-13 21:39:21 +01:00
2 changed files with 6 additions and 5 deletions
Showing only changes of commit 7589ad043d - Show all commits

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]);
}
})