Sha256: 653c5ca593d5f6b45410405a13aef4f283cb7ef192db3dc8444910efee8cd855
Contents?: true
Size: 470 Bytes
Versions: 39
Compression:
Stored size: 470 Bytes
Contents
# frozen_string_literal: true module Vmpooler class API class RequestLogger attr_reader :app def initialize(app, options = {}) @app = app @logger = options[:logger] end def call(env) status, headers, body = @app.call(env) @logger.log('s', "[ ] API: Method: #{env['REQUEST_METHOD']}, Status: #{status}, Path: #{env['PATH_INFO']}, Body: #{body}") [status, headers, body] end end end end
Version data entries
39 entries across 39 versions & 1 rubygems