Logrus Hook for Bugsnag
Description
Installation
$ go get github.com/osamingo/bugsnag-logrus-hook
Usage
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