Code review changes

This commit is contained in:
Burke Libbey
2015-03-19 11:17:22 -04:00
parent 83752ed3c5
commit d96cee72fa
3 changed files with 47 additions and 26 deletions
+6
View File
@@ -74,6 +74,7 @@ import (
"os"
log "github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus/hooks/airbrake"
"github.com/Sirupsen/logrus/hooks/bugsnag"
)
func init() {
@@ -84,6 +85,11 @@ func init() {
// an exception tracker. You can create custom hooks, see the Hooks section.
log.AddHook(&logrus_airbrake.AirbrakeHook{})
// Use the Bugsnag hook to report errors that have Error severity or above to
// an exception tracker. You can create custom hooks, see the Hooks section.
bugsnagHook, _ = logrus_bugsnag.NewBugsnagHook()
log.AddHook(bugsnagHook)
// Output to stderr instead of stdout, could also be a file.
log.SetOutput(os.Stderr)