mattt / Rack Http Logger
Licence: mit
Log metrics from HTTP request parameters according to l2met conventions
Stars: ✭ 59
Programming Languages
ruby
36898 projects - #4 most used programming language
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 totrue
-
method
: Matched HTTP Method. Defaults toLOG
-
path
: Matched URL path. Defaults to/
-
source
: Source attribute in log line. Defaults torack-http-logger
Usage
Rack::HTTPLogger can be run as Rack middleware.
config.ru
require 'rack/http-logger'
use Rack::HTTPLogger
Contact
License
Rack::HTTPLogger is available under the MIT license. See the LICENSE file for more info.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].