Sha256: 3bad81e5bd4af311b4a302ef818d9872d7603bfd05215921b73275ab174be5ca

Contents?: true

Size: 267 Bytes

Versions: 6

Compression:

Stored size: 267 Bytes

Contents

Rack::App::Extension.register(:logger) do

  require "logger"
  require "securerandom"

  define_method(:logger) do
    @logger ||= Rack::App::Logger.new(STDOUT).tap do |this|
      this.id = request.env['HTTP_X_REQUEST_ID']
    end
  end

  before { logger }
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/bundled_extensions/logger.rb
rack-app-11.0.1 lib/rack/app/bundled_extensions/logger.rb
rack-app-11.0.0 lib/rack/app/bundled_extensions/logger.rb
rack-app-10.0.0 lib/rack/app/bundled_extensions/logger.rb
rack-app-9.0.0 lib/rack/app/bundled_extensions/logger.rb
rack-app-8.1.0 lib/rack/app/bundled_extensions/logger.rb