1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-03-01 23:01:45 +00:00
Holger Just c58c70febb Add Rack middleware
The middleware can be used in a Rack appliction wrap all log messages
emitted to the logger during a single request in a single emitted log
event. This ensures that all data concerning the request, including log
messages as well as additional fields and tags are logged as one single
event.

This ensures that the data is kept as a whole when the log event is
handled by later systems like Logstash. Each request can be analyzed as
a whole without having to group or parse complex multi-line log formats.
2017-10-18 00:21:43 +02:00

22 lines
606 B
Ruby

# frozen_string_literal: true
# Copyright 2016 Holger Just
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE.txt file for details.
require 'rack'
module Rackstash
# This module contains the integration classes into
# [Rack](https://github.com/rack/rack), the generic webserver interface for
# Ruby frameworks.
#
# Here, we provide a very basic integration. You can use it as a building
# block for more specific integrations into frameworks like Hanami, Rails, or
# Sinatra.
module Rack
end
end
require 'rackstash/rack/middleware'