Is there a way to prevent logging in iex when running iex -S mix?

I have bunch of genservers running. Whenever they fail, they will log the error in my iex console and i dont see what i have typed anymore. How can i fix this? I also have websockets which do print in the iex console and it also disturbs what i am typing.

I run iex with the following command iex -S mix phx.server and iex -S mix but no matter what , the genservers will always disturb by printing the error msg in both the iex console

1 Like

Hi, you either set the log level in your config/dev.exs or type Logger.configure(level: :none) in your iex.

3 Likes

Another thing that you can do is to attach the IEx to a running system. This way, you won’t get the logs in the IEx. In one terminal session start the app but give the Erlang node a name (“web”) so that you can connect to it later:

$ elixir --sname web -S mix phx.server

In a different terminal session, attach to the running app:

$ iex --sname iex --remsh web@$(hostname)
11 Likes

i do want the logs for debugging but i dont want it my my other terminal :slight_smile: