Azolo/websockex

Async mode logging unnecessary messages

Closed this issue · 4 comments

When starting the connection using the async: true option in the start_link/4 function the library starts logging some messages.
For example:
{#Reference<0.2707508044.11272194.150465>, :ok} {:DOWN, #Reference<0.2707508044.11272194.150465>, :process, #PID<0.1226.0>, :normal}
This is no big problem until I run tests that heavily use websockex connections underneath. I get so many of those messages that I'm unable to see the actual test results.
This probably happens for the following reasons:

  1. Websockex start init process and starts the real ws process asynchronously.
  2. Once the real connection is up the init process is dropped and probably causing the problem.
  3. The messages get printed to the screen.

Is there anything I can do to supress those messages?

Azolo commented

Can you tell me what version of Erlang and Elixir you're using?

Elixir 1.12.2 and Erlang/OTP 24.

Azolo commented

Sorry, I haven't had time to look into this yet.

The problem was with my code. Basically I was logging out these messages from the genserver.