Project

sqs_logger

0.0
No commit activity in last 3 years
No release in over 3 years
Rack middlware for sending logs to Amazon's SQS
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 0.3
~> 10.0

Runtime

~> 2.1
~> 1.5.2
 Project Readme

SqsLogger

SqsLogger is a Ruby gem built to send log entries to sqs

Installation

Add this line to your application's Gemfile:

gem 'sqs_logger'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sqs_logger

Usage

Rails example

Add an initializer to configure SqsLogger:

SqsLogger.setup do |config|
  config.application_name = 'foobar'
  config.sqs_queue_name   = ENV['AWS_LOG_QUEUE']
end

In the appropriate environment file, add SqsLogger as middleware:

FooBar::Application.configure do
  config.middleware.use(SqsLogger::Logger)
end

Sinatra example

Add an initializer to configure SqsLogger:

SqsLogger.setup do |config|
  config.application_name = 'foobar'
  config.sqs_queue_name   = ENV['AWS_LOG_QUEUE']
end

Add the SqsLogger middleware:

class Base < Sinatra::Base
  configure :production do
    use SqsLogger::Logger
  end
end