Sha256: 8ef5605ef72c166c9262cc3b3abf5184784ae5e2b1087eca7abc57faf50171cd
Contents?: true
Size: 553 Bytes
Versions: 2
Compression:
Stored size: 553 Bytes
Contents
require 'rack/action_logger/container' module Rack::ActionLogger::ControllerConcerns module RequestLog extend ActiveSupport::Concern included do before_action :set_request_log end def set_request_log Rack::ActionLogger::Container.set_request_log({ path_info: request.path_info, request_method: request.request_method }, 'action.request') request_id = Rails::VERSION::MAJOR >= 5 ? request.request_id : request.uuid Rack::ActionLogger::Container.merge_attributes({ request_id: request_id }) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rack-action_logger-0.1.1 | lib/rack/action_logger/controller_concerns/request_log.rb |
rack-action_logger-0.1.0 | lib/rack/action_logger/controller_concerns/request_log.rb |