0.0
No commit activity in last 3 years
No release in over 3 years
Semlogr integration for rack providing features such as request logging.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 0.11
~> 12.3
~> 3.7
~> 0.53

Runtime

~> 0.3
 Project Readme

Codeship Status for semlogr/semlogr-rack Maintainability Test Coverage

Semlogr integration for Rack

This integration provides some extensions for logging with Rack, currently it provides a request logger that logs the details about all requests including timing information.

Installation

To install:

gem install semlogr-rack

Or if using bundler, add semlogr to your Gemfile:

gem 'semlogr-rack'

then:

bundle install

Getting Started

Create an instance of the logger and configue the RequestLogger and RequestCorrelator middleware.

require 'semlogr'
require 'semlogr/rack'

Semlogr.logger = Semlogr.create_logger do |c|
  c.log_at :info

  c.write_to :console
end

...

use Semlogr::Rack::RequestCorrelator
use Semlogr::Rack::RequestLogger

Development

After cloning the repository run bundle install to get up and running, to run the specs just run rake spec.

Contributing

See anything broken or something you would like to improve? feel free to submit an issue or better yet a pull request!