Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Move airbrake to dedicated repo(s)
Browse files Browse the repository at this point in the history
The current implementation is using an old implementation of the
Airbrake v2 api. Airbrake has release v2 since, but this package is
necessary for in-house solutions like errbit.
The number of errbit users don't justify to continue pushing this
version as the official.
That's why the official hook is now using gobrake (the official
package), and the one coming from logrus is now named "legacy".
  • Loading branch information
Philippe Lafoucrière committed Oct 6, 2015
1 parent fe72f59 commit 297ec6f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 195 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,13 @@ package main
import (
"os"
log "github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus/hooks/airbrake"
"github.com/gemnasium/logrus-airbrake-hook"
)

func init() {
// Log as JSON instead of the default ASCII formatter.
log.SetFormatter(&log.JSONFormatter{})

// Use the Airbrake hook to report errors that have Error severity or above to
// an exception tracker. You can create custom hooks, see the Hooks section.
log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development"))

// Output to stderr instead of stdout, could also be a file.
log.SetOutput(os.Stderr)

Expand Down Expand Up @@ -182,13 +178,16 @@ Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
```go
import (
log "github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus/hooks/airbrake"
"gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake"
logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
"log/syslog"
)

func init() {
log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development"))

// Use the Airbrake hook to report errors that have Error severity or above to
// an exception tracker. You can create custom hooks, see the Hooks section.
log.AddHook(airbrake.NewHook(123, "xyz", "production"))

hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
if err != nil {
Expand All @@ -202,7 +201,8 @@ Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/v

| Hook | Description |
| ----- | ----------- |
| [Airbrake](https://github.com/Sirupsen/logrus/blob/master/hooks/airbrake/airbrake.go) | Send errors to an exception tracking service compatible with the Airbrake API. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
| [Papertrail](https://github.com/Sirupsen/logrus/blob/master/hooks/papertrail/papertrail.go) | Send errors to the Papertrail hosted logging service via UDP. |
| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
| [BugSnag](https://github.com/Sirupsen/logrus/blob/master/hooks/bugsnag/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
Expand Down
54 changes: 0 additions & 54 deletions hooks/airbrake/airbrake.go

This file was deleted.

133 changes: 0 additions & 133 deletions hooks/airbrake/airbrake_test.go

This file was deleted.

0 comments on commit 297ec6f

Please sign in to comment.