https://github.com/osamingo/bugsnag-logrus-hook
Logrus Hook for Bugsnag
https://github.com/osamingo/bugsnag-logrus-hook
Last synced: over 1 year ago
JSON representation
Logrus Hook for Bugsnag
- Host: GitHub
- URL: https://github.com/osamingo/bugsnag-logrus-hook
- Owner: osamingo
- License: mit
- Created: 2015-04-28T07:17:52.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-10-25T14:35:57.000Z (over 7 years ago)
- Last Synced: 2025-01-04T13:44:22.947Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 215 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Logrus Hook for Bugsnag
[](https://travis-ci.org/osamingo/bugsnag-logrus-hook)
[](https://codecov.io/github/osamingo/bugsnag-logrus-hook?branch=master)
[](https://github.com/osamingo/bugsnag-logrus-hook/blob/master/LICENSE)
## Description
A Hook of [Logrus](https://github.com/Sirupsen/logrus) for [Bugsnag](https://github.com/bugsnag/bugsnag-go)
## Installation
```
$ go get github.com/osamingo/bugsnag-logrus-hook
```
## Usage
```go
package main
import (
"github.com/Sirupsen/logrus"
"github.com/osamingo/bugsnag-logrus-hook"
)
func main() {
h, err := bugsnagrus.NewBugsnagHook(
"APIKey",
"develop",
[]logrus.Level{logrus.WarnLevel, logrus.ErrorLevel},
1,
)
if err != nil {
panic(err)
}
logrus.AddHook(h)
logrus.Error("error is occured")
}
```
## License
MIT