Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

G5/logrusbadger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logrusbadger GoDoc

logrusbadger is a logrus-compatible hook that uses the official Honeybadger go library to notify Honeybadger.

Any fields included with the log message will be added to the context of the honeybadger notification, and the main message of the log will be used as it's type. Any error added using logrus's WithError function will be set as the exception's type. This encourages you to use generic error messages like retrieving current user as your message, while added specific details as additional fields.

Usage

Just register the hook with logrus. All configuration (API keys, timeouts, etc) should happen via Honeybadger's official libraries.

log.AddHook(logrusbadger.NewHook())

License

This library is MIT licensed. See the LICENSE file in this repository for details.

About

A logrus-compatible hook for Honeybadger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages