Silencing Rails Console Log for ActionCable Steam

1k Views Asked by At

I've connected my channel to an external website steam. All that data is streaming through the console. It's great to see the information that's coming in but is there a way to silence each channel stream from the console?

1

There are 1 best solutions below

1
On

as described in the following post and tested in my own ActionCable app https://sprachspiel.xyz/

in config/environments/development.rb or production.rb

To completely disable logging from ActionCable you should configure ActionCable to use logger that do nothing

ActionCable.server.config.logger = Logger.new(nil)

This will remove the following messages and keep the GET request to /cable

Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
MessagesChannel is transmitting the subscription confirmation
MessagesChannel is streaming from messages