distribution/vendor/github.com/Shopify/logrus-bugsnag/README.md
Matt Tescher 7c4d584e58 add bugsnag logrus hook
Signed-off-by: Matt Tescher <matthew.tescher@docker.com>
2018-10-25 14:52:10 -07:00

590 B

logrus-bugsnag

Build Status

logrus-bugsnag is a hook that allows Logrus to interface with Bugsnag.

Usage

import (
  log "github.com/sirupsen/logrus"
  "github.com/Shopify/logrus-bugsnag"
  bugsnag "github.com/bugsnag/bugsnag-go"
)

func init() {
  bugsnag.Configure(bugsnag.Configuration{
    APIKey: apiKey,
  })
  hook, err := logrus_bugsnag.NewBugsnagHook()
  logrus.StandardLogger().Hooks.Add(hook)
}