debug(action_cable): add server-side broadcast logging

- Log channel remapping and data on every broadcast
- Log warnings when channel format is unknown
- Helps trace whether broadcasts reach ActionCable.server
This commit is contained in:
BenClaw
2026-05-17 19:41:00 +02:00
parent 7c69f0a0bc
commit bdd1d248db
+5 -1
View File
@@ -30,8 +30,12 @@ module Mozo
data = message[:data] || message['data']
remapped = remap_channel(channel)
return unless remapped
unless remapped
Rails.logger.warn("[ACTION_CABLE] broadcast skipped: unknown channel #{channel}")
return
end
Rails.logger.debug("[ACTION_CABLE] broadcasting to #{remapped}: #{data.inspect}")
::ActionCable.server.broadcast(remapped, data)
rescue => e
Rails.logger.error("[ACTION_CABLE][ERROR] #{e.message}")