Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add extra log payload in action cable? #349

Open
j15e opened this issue Apr 21, 2022 · 0 comments
Open

How to add extra log payload in action cable? #349

j15e opened this issue Apr 21, 2022 · 0 comments

Comments

@j15e
Copy link

j15e commented Apr 21, 2022

I am looking for a way to do something like this, but in ActionCable context :

# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
  def append_info_to_payload(payload)
    super
    payload[:host] = request.host
  end
end

I could not find an example; any suggestion? I looked at the lograge code too, but the ActionCable log patching is a bit complex, to say the least. Is it even possible to hook ourselves in the log process in a similar manner with ActionCable?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant