add bugsnag logrus hook
Signed-off-by: Matt Tescher <matthew.tescher@docker.com>
This commit is contained in:
parent
93e082742a
commit
7c4d584e58
5 changed files with 156 additions and 13 deletions
24
vendor/github.com/Shopify/logrus-bugsnag/README.md
generated
vendored
Normal file
24
vendor/github.com/Shopify/logrus-bugsnag/README.md
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
## logrus-bugsnag
|
||||
|
||||
[](https://travis-ci.org/Shopify/logrus-bugsnag)
|
||||
|
||||
logrus-bugsnag is a hook that allows [Logrus](https://github.com/sirupsen/logrus) to interface with [Bugsnag](https://bugsnag.com).
|
||||
|
||||
#### Usage
|
||||
|
||||
```go
|
||||
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)
|
||||
}
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue