Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.
/ rack-http-logger Public archive

Log metrics from HTTP request parameters according to l2met conventions

License

Notifications You must be signed in to change notification settings

mattt/rack-http-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack::HTTPLogger

Rack::HTTPLogger is Rack middleware that provides a logging endpoint for your application. HTTP request parameters are automatically formatted according to l2met and logged to a specified stream, such as STDOUT.

This is designed for anyone using Heroku, which uses Logplex to aggregate messages for further monitoring and analytics. With Rack::HTTPLogger remote events, such as mobile device registrations, can be collected and processed into your common log stream.

Installation

$ gem install rack-http-logger

Options

  • stream: Stream to which lines are logged. Defaults to $stdout.
  • sync: Print log lines to stream synchronously (not recommended for applications with high throughput). Defaults to true
  • method: Matched HTTP Method. Defaults to LOG
  • path: Matched URL path. Defaults to /
  • source: Source attribute in log line. Defaults to rack-http-logger

Usage

Rack::HTTPLogger can be run as Rack middleware.

config.ru

require 'rack/http-logger'

use Rack::HTTPLogger

Contact

Mattt

License

Rack::HTTPLogger is available under the MIT license. See the LICENSE file for more info.

About

Log metrics from HTTP request parameters according to l2met conventions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages