Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heroku/rollrus

Logrus Rollbar Hook
https://github.com/heroku/rollrus

go logrus logrus-hook rollbar

Last synced: 3 months ago
JSON representation

Logrus Rollbar Hook

Awesome Lists containing this project

README

        

[![CircleCI](https://circleci.com/gh/heroku/rollrus.svg?style=svg)](https://circleci.com/gh/heroku/rollrus) [![GoDoc](https://godoc.org/github.com/heroku/rollrus?status.svg)](https://godoc.org/github.com/heroku/rollrus)

# What

Rollrus is what happens when [Logrus](https://github.com/sirupsen/logrus) meets [Rollbar](github.com/rollbar/rollbar-go).

Install the hook into a Logrus logger to report logged messages to Rollbar.
By default, only messages with the Error, Fatal, or Panic level are reported.

Panic and Fatal errors are reported synchronously to help ensure that logs are delivered before the process exits.
All other messages are delivered in the background, and may be dropped if the queue is full.

If the error includes a [`StackTrace`](https://godoc.org/github.com/pkg/errors#StackTrace), that `StackTrace` is reported to rollbar.

# Usage

Examples available in the [tests](https://github.com/heroku/rollrus/blob/master/examples_test.go) or on [GoDoc](https://godoc.org/github.com/heroku/rollrus).