rails_semantic_logger icon indicating copy to clipboard operation
rails_semantic_logger copied to clipboard

Payload params class is a ActiveSupport::HashWithIndifferentAccess

Open StoneGod opened this issue 1 year ago • 2 comments
trafficstars

Environment

Provide at least:

  • Ruby Version. - 3.3.5
  • Rails Version. - 7.1.4
  • Semantic Logger Version. - 4.16.1
  • Rails Semantic Logger Version. - 4.14.0
  • Other Application/framework names and versions (e.g. Puma, etc.).
From: /usr/local/bundle/gems/rails_semantic_logger-4.14.0/lib/rails_semantic_logger/action_controller/log_subscriber.rb:13 RailsSemanticLogger::ActionController::LogSubscriber#process_action:

     8:         controller_logger(event).debug { "Processing ##{event.payload[:action]}" }
     9:       end
    10:
    11:       def process_action(event)
    12:         controller_logger(event).info do
 => 13:           binding.pry
    14:           payload = event.payload.dup
    15:
    16:           # Unused, but needed for Devise 401 status code monkey patch to still work.
    17:           ::ActionController::Base.log_process_action(payload)
    18:

[1] pry(#<RailsSemanticLogger::ActionController::LogSubscriber>)> event
=> #<ActiveSupport::Notifications::Event:0x00007fffcfc6ea68
[2] pry(#<RailsSemanticLogger::ActionController::LogSubscriber>)> event.payload[:params].class
=> ActiveSupport::HashWithIndifferentAccess

Because of this, kibana cannot parse payload params I can make an MP with a fix if this is really a bug and not a configuration problem

StoneGod avatar Oct 16 '24 08:10 StoneGod