No release in over a year
An appender for the Logging gem that sends all messages logged at the :error level to Honeybadger
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.0, < 5.16
>= 0

Runtime

 Project Readme

Logging Honeybadger

CI

Honeybadger appender for the Logging gem

Overview

Install the gem: gem install logging-honeybadger.

If you're using Bundler add the following to your Gemfile: gem "logging-honeybadger", :require => false

Then add the Honeybadger appender:

require "logging"

log = Logging.logger[self]
log.add_appenders(
  Logging.appenders.honeybadger(
    :api_key => "123XYZ",
    :exceptions => { :ignore => %w[SomeThang AnotherThang] }
  )
)

# Or

Honeybadger.configure do |cfg|
  # ...
end

log.add_appenders(Logging.appenders.honeybadger)

log.info  "Not sent to honeybadger"
log.error "Honeybadger here I come!"
log.error SomeError.new("See you @ app.honeybadger.io!")

Note that Logging will load the appender. You do not need to explicitly require it.

Description

Only events with the :error log level are sent to Honeybadger. By default the appender will be named "honeybadger". This can be changed by passing a name to the honeybadger method:

Logging.appenders.honeybadger("another_name", options)

Honeybadger configuration can be done via Honeybadger.configure or via Logging.appenders.honeybadger. The later accepts (most) Honeybadger options via the options Hash.

See Also

Logging::Appenders::Airbrake - Airbrake appender for the Logging gem

Author

Skye Shaw [sshaw AT gmail.com]

License

Released under the MIT License: www.opensource.org/licenses/MIT