by clemens (05.10.2022)

Printing full error message from :error_logger warning

tl;dr

I’ve got a problem where Phoenix.Channel.Server receives an unexpected message to be pushed to my client via a channel. However that message is very long, and some of the important information is only printed at the very bottom of the log message that has been truncated.

The solution was to simply add an IO.puts() statement into the Phoenix.Channel.Server module into the correct function by modifying the file in deps/phoenix/lib/phoenix/channel/server.ex. Afterwards we can reload the module from iex using r Phoenix.Channel.Server. That will recompile the source file and reload it.