Closed evalphobia closed 5 years ago
This PR adds error handler used when Sentry omits error.
Example usage is like below,
var sentryErrCounter uint64 = 0 func initLogrusHook() { hook, _ := logrus_sentry.NewSentryHook(dsn, []logrus.Level{ logrus.ErrorLevel, }) // increment Sentry error counter incrementErrCounterHandle := func(entry *logrus.Entry, err error) { atomic.AddUint64(&sentryErrCounter, 1) fmt.Printf("[Sentry Error] %s\n", err.Error()) } hook.AddErrorHandler(incrementErrCounterHandle) // ...
This PR adds error handler used when Sentry omits error.
Example usage is like below,