Make ActionCable logging less verbose in development#23709
Make ActionCable logging less verbose in development#23709dhh merged 1 commit intorails:masterfrom jankeesvw:set-action-cable-logging-to-debug
Conversation
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @matthewd (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
I would also be happy to remove the Like this: server.logger.info "[ActionCable] Broadcasting to #{broadcasting}" |
|
I'd stick with info and just truncate the message part so it doesn't go crazy on a big HTML send. Maybe just do the first 300 chars or so. |
|
Hi @dhh, I changed the commit as you proposed, I also added three dots ( I would love to hear if this is ready to merge, or if it needs a little more work. |
|
This would give us three dots even when you're not truncating. You can use String#truncate from Active Support to do this. |
|
I changed it, now it uses ActiveSupport's |
|
You don't actually need to specify the omission part. Three dots is the default. So it can just be truncate(300). |
When running the ActionCable server in development I get a lot of output in my logs, this commit sets a maximum length of 300 characters for a broadcast log message.
|
Whoops, sorry! Changed! |
|
👌 |
…debug Make ActionCable logging less verbose in development
When running the ActionCable server in development I get a lot of log messages, even when I set the application log level to
config.log_level = :info.With this commit I move the level for ActionCable toWith this commit I truncate the log message as proposed by @dhh in #23709 (comment).debugwhich is more appropriate in my opinion.Example of my current output to illustrate the problem: