0.01
A long-lived project that still receives updates
Rack middleware to log requests in logstash json event format. Like the logstasher gem, but for rack apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 2, < 4
 Project Readme

Rack::Logstasher

Rack middleware to log requests in logstash json event format. It is designed to give Rails-like logging to Sinatra apps. The gem is currently used by search-api and contentful-listener-api.

Installation

Add this line to your application's Gemfile:

gem 'rack-logstasher'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-logstasher

Usage

Add this to the middleware stack. e.g.

use Rack::Logstasher::Logger, Logger.new("/path/to/logfile.json.log")

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Licence

MIT License