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

Logging issues #73

Open
jwoertink opened this issue Jun 27, 2023 · 0 comments
Open

Logging issues #73

jwoertink opened this issue Jun 27, 2023 · 0 comments

Comments

@jwoertink
Copy link
Collaborator

Today I learned that when you have a connection in a channel, and you broadcast a message to that channel, Cable will log once for each connection on that channel...

So this means, if you have a chat channel with 100 users, and you send "hi", your server will log out the "hi" broadcast 100 times:

▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
....

For now, you can disable logs with Cable::Logger.level = :none

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