lograge: NameError: undefined method `append_info_to_payload' for class `ActionCable::Channel::Base'
After upgraded 0.11.0.
Got a below error.
NameError: undefined method `append_info_to_payload' for class `ActionCable::Channel::Base'
with this setting
config.lograge.custom_payload do |controller|
{
user_agent: controller.request.user_agent,
}
end
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 15
- Comments: 15 (2 by maintainers)
Commits related to this issue
- Remove ActionCable::Channel::Base from base classes when setting custom_payload Remove ActionCable::Channel::Base from base classes when setting custom_payload Fixes https://github.com/roidrage/logr... — committed to xlts/lograge by xlts 5 years ago
- Remove ActionCable::Channel::Base from base classes when setting custom_payload Remove ActionCable::Channel::Base from base classes when setting custom_payload Fixes https://github.com/roidrage/logr... — committed to xlts/lograge by xlts 5 years ago
- Remove ActionCable::Channel::Base from base classes when setting custom_payload Remove ActionCable::Channel::Base from base classes when setting custom_payload Fixes https://github.com/roidrage/logr... — committed to xlts/lograge by xlts 5 years ago
- Revert "Bump lograge from 0.10.0 to 0.11.0" This reverts commit 19073765c554261ebae0fc5cbbb97136a0766a18 pending the resolution of https://github.com/roidrage/lograge/issues/285. — committed to CHTJonas/roombooking by CHTJonas 5 years ago
- Remove ActionCable::Channel::Base from base classes when setting custom_payload (#286) Remove ActionCable::Channel::Base from base classes when setting custom_payload Fixes https://github.com/roid... — committed to roidrage/lograge by xlts 5 years ago
Sorry about this folks. I’m working on a fix.
Just want to bring this one back up. Can we get #286 merged? Thanks for your work on this!
Sorry guys, that’s my fault, I did overlook the
custom_payloadoption when implementing Action Cable log formatting. Here’s the PR with the fix: https://github.com/roidrage/lograge/pull/286 (cc @benlovell)As for the option itself, we should figure out the way
custom_payloadwould work in Action Cable classes. Maybe it’d be good to support formatters for each event (perform_action,subscribe,unsubscribe…) or for each class, asActionCable::Connection::BaseandActionCable::Channel::Basedon’t share a common context.I’m getting this error as well, but only when I run the asset precompile rake task in a Docker container. The application and rake tasks work fine locally. Weird.
Adding the initializer allows me to precompile assets in the container, but I had to tweak it a little to define the config:
It seems to work fine. I am not using ActionCable in this app.
Thanks for the tip @decoch
Ugh. I’ll get this resolved properly tomorrow. Apologies folks.
@xlts It works locally, if you could add a spec when you get a moment that would help. I’ll cut a release with the fix now.
I am also facing the same issue. Could I prevent error this but there is no problem?
If what I referenced above is the problematic code, it’s unchanged in 0.11.1 and I’m still getting the error.
I have the same issue. Everything works fine on
v0.10.0, while I get the error onv0.11.0. I am using the latest version of Rails (v5.2.3).