updated slack config

This commit is contained in:
bill bittner 2017-09-14 13:09:09 -07:00
parent f53ca8d958
commit b949c75e9d
3 changed files with 10 additions and 5 deletions

View file

@ -9,6 +9,8 @@
"MySqlConnectionUri": "none" "MySqlConnectionUri": "none"
}, },
"Logging": { "Logging": {
"LogLevel": "silly" "LogLevel": "silly",
"SlackErrorChannel": "staging_speech-errors",
"SlackInfoChannel": "none"
} }
} }

View file

@ -9,6 +9,8 @@
"MySqlConnectionUri": "none" "MySqlConnectionUri": "none"
}, },
"Logging": { "Logging": {
"LogLevel": "verbose" "LogLevel": "verbose",
"SlackErrorChannel": "speech-errors",
"SlackInfoChannel": "speech-logs"
} }
} }

View file

@ -1,6 +1,7 @@
const config = require('config'); const config = require('config');
const SLACK_WEB_HOOK = config.get('Logging.SlackWebHook'); const SLACK_WEB_HOOK = config.get('Logging.SlackWebHook');
const SLACK_ERROR_CHANNEL = config.get('Logging.SlackErrorChannel');
const SLACK_INFO_CHANNEL = config.get('Logging.SlackLogsChannel');
const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook; const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;
module.exports = (winston) => { module.exports = (winston) => {
@ -9,7 +10,7 @@ module.exports = (winston) => {
name : 'slack-errors-transport', name : 'slack-errors-transport',
level : 'error', level : 'error',
webhookUrl: SLACK_WEB_HOOK, webhookUrl: SLACK_WEB_HOOK,
channel : '#speech-errors', channel : SLACK_ERROR_CHANNEL,
username : 'errorBot', username : 'errorBot',
iconEmoji : ':face_with_head_bandage:', iconEmoji : ':face_with_head_bandage:',
}); });
@ -17,7 +18,7 @@ module.exports = (winston) => {
name : 'slack-info-transport', name : 'slack-info-transport',
level : 'info', level : 'info',
webhookUrl: SLACK_WEB_HOOK, webhookUrl: SLACK_WEB_HOOK,
channel : '#speech-logs', channel : SLACK_INFO_CHANNEL,
username : 'infoBot', username : 'infoBot',
iconEmoji : ':nerd_face:', iconEmoji : ':nerd_face:',
}); });