forked from mirrors/probot
Connect sentry to logger
This commit is contained in:
parent
e64f65a5fc
commit
fd3f1e0208
4
index.js
4
index.js
|
@ -1,5 +1,6 @@
|
|||
const bunyan = require('bunyan');
|
||||
const bunyanFormat = require('bunyan-format');
|
||||
const sentryStream = require('bunyan-sentry-stream');
|
||||
const cacheManager = require('cache-manager');
|
||||
const createIntegration = require('github-integration');
|
||||
const createWebhook = require('github-webhook-handler');
|
||||
|
@ -33,11 +34,12 @@ module.exports = options => {
|
|||
Raven.config(process.env.SENTRY_URL, {
|
||||
captureUnhandledRejections: true
|
||||
}).install({});
|
||||
|
||||
logger.addStream(sentryStream(Raven));
|
||||
}
|
||||
|
||||
// Handle case when webhook creation fails
|
||||
webhook.on('error', err => {
|
||||
Raven.captureException(err);
|
||||
robot.log.error(err);
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"bottleneck": "^1.15.1",
|
||||
"bunyan": "^1.8.5",
|
||||
"bunyan-format": "^0.2.1",
|
||||
"bunyan-sentry-stream": "^1.1.0",
|
||||
"cache-manager": "^2.4.0",
|
||||
"commander": "^2.9.0",
|
||||
"dotenv": "~4.0.0",
|
||||
|
|
Loading…
Reference in New Issue