Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Per-request batching for rack applications using Graylog2

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

rack-graylog2

rack-graylog2 is a rack middleware and GELF logger wrapper that allows batching of all log calls by request rather than by each call to the logger.

Installation

Add the following to your environment.rb for Rails 2.

require 'rack/graylog2'
config.active_record.colorize_logging = false # Disable ANSI codes
config.logger = ::Rack::Graylog2::Logger.new # Takes GELF::Notifier arguments 
config.middleware.insert_before "ActionController::Failsafe", "Rack::Graylog2", config.logger
Something went wrong with that request. Please try again.