raven is a Go client for the Sentry event/error logging system.
This repo is forked from Sentry Client in Go commit : d5057ceb70caa73feca9ba5d75a8fc00c9dd0aae
Official Sentry Client in Go doesn't support LEVEL definition such as DEBUG, INFO, WARNING, ERROR or FATAL. Adding new function to pass LEVEL when initialize Sentry packet.
go get github.com/stevenon1003/raven-go
If you use dep, type following after go get
dep ensure -add github.com/stevenon1003/raven-go
Function name: raven.CaptureErrorAndWaitWithLevel
raven.CaptureErrorWithLevel
Severity: raven.DEBUG
raven.INFO
raven.WARNING
raven.ERROR
raven.FATAL
package main
import "github.com/stevenon1003/raven-go"
func init() {
raven.SetDSN("https://xxxx:yyyy@sentry.io/zzzzzz")
}
//Blocking call
f, err := os.Open("filename.ext")
if err != nil {
raven.CaptureErrorAndWaitWithLevel(err, nil, raven.WARNING)
log.Panic(err)
}
//non-blocking call
raven.CaptureErrorWithLevel(err, nil, raven.INFO)