lib/ocean/selective_rack_logger.rb
def call_app(request, env)
    # Put some space between requests in development logs.
    if development?
      logger.debug ''
      logger.debug ''
    end

    instrumenter = ActiveSupport::Notifications.instrumenter
    instrumenter.start 'request.action_dispatch', request: request
    logger.info started_request_message(request) unless Rails.env.production?
    resp = @app.call(env)
    resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
    resp
  rescue
    finish(request)
    raise
  ensure
    ActiveSupport::LogSubscriber.flush_all!
  end
#
# Monkey patch: no started_request_message logged in production.
#
Monkey patch: no started_request_message logged in production.
Monkey patch : no started_request_message logged in production .
def call_app(request, env)
    if development?
      logger.debug ''
      logger.debug ''
    end
    instrumenter = ActiveSupport::Notifications.instrumenter
    instrumenter.start 'request.action_dispatch', request: request
    logger.info started_request_message(request) unless Rails.env.production?
    resp = @app.call(env)
    resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
    resp
  rescue
    finish(request)
    raise
  ensure
    ActiveSupport::LogSubscriber.flush_all!
  end
def call_app ( request , env ) if development? logger . debug '' logger . debug '' end instrumenter = ActiveSupport :: Notifications . instrumenter instrumenter . start 'request.action_dispatch' , request : request logger . info started_request_message ( request ) unless Rails . env . production? resp = @app . call ( env ) resp [ 2 ] = :: Rack :: BodyProxy . new ( resp [ 2 ] ) { finish ( request ) } resp rescue finish ( request ) raise ensure ActiveSupport :: LogSubscriber . flush_all! end
Monkey patch: no started_request_message logged in production.
Monkey patch : no started_request_message logged in production .
# Put some space between requests in development logs.
request
env