0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Enables flexible logging to multiple adapters by providing common interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0

Runtime

~> 2.12
 Project Readme

ArcadiaLogger

Simple abstraction for error/event logging - currently available are ruby logger and rollbar

Installation

Add this line to your application's Gemfile:

gem 'arcadia_logger'

And then execute:

$ bundle

Or install it yourself as:

$ gem install arcadia_logger

Configuration

# config/initializers/arcadia_logger.rb
ArcadiaLogger.setup do |config|
  config.adapters = {
    custom_logger: ArcadiaLogger::Adapters::Logger.new # STDOUT by default,
    rails_application_logger: ArcadiaLogger::Adapters::Logger.new(logger: Rails.logger),
    rollbar: ArcadiaLogger::Adapters::Rollbar.new # needs to be already configured (api key set) in your app
  }
end

Usage

# send to all adapters by default
ArcadiaLogger.log(severity: :error, message: 'message')

# only to selected adapters
ArcadiaLogger.log(severity: :error, message: 'message', adapters: [:custom_logger, :rollbar])

# ruby logger style
ArcadiaLogger.error('message')

# to selected adapters
ArcadiaLogger.error('message', adapters: [:custom_logger, :rollbar])