modulepackage
0.0.0-20171204204709-577dee27f20d
Repository: https://github.com/rookout/logrus-bugsnag.git
Documentation: pkg.go.dev
# README
logrus-bugsnag
logrus-bugsnag is a hook that allows Logrus to interface with Bugsnag.
Usage
import (
log "github.com/sirupsen/logrus"
"github.com/Shopify/logrus-bugsnag"
bugsnag "github.com/bugsnag/bugsnag-go"
)
func init() {
bugsnag.Configure(bugsnag.Configuration{
APIKey: apiKey,
})
hook, err := logrus_bugsnag.NewBugsnagHook()
logrus.StandardLogger().Hooks.Add(hook)
}
# Functions
NewBugsnagHook initializes a logrus hook which sends exceptions to an exception-tracking service compatible with the Bugsnag API.
# Variables
ErrBugsnagUnconfigured is returned if NewBugsnagHook is called before bugsnag.Configure.
# Structs
ErrBugsnagSendFailed indicates that the hook failed to submit an error to bugsnag.