Skip to content

stevenon1003/raven-go

 
 

Repository files navigation

raven

raven is a Go client for the Sentry event/error logging system.

Fork information

This repo is forked from Sentry Client in Go commit : d5057ceb70caa73feca9ba5d75a8fc00c9dd0aae

Objective

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.

Installation

go get github.com/stevenon1003/raven-go

If you use dep, type following after go get

dep ensure -add github.com/stevenon1003/raven-go

How to use

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)

About

Sentry client in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.5%
  • Shell 0.5%