 
     :error_logger.warning_msg(
       ~c"~p ~p received unexpected message in #{fun}/#{arity}: ~p~n",
-      [__MODULE__, proc, msg]
+      [channel, proc, msg]
     )
   end
 end

      |> socket.channel.handle_info(socket)
      |> handle_result(:handle_info)
    else
      warn_unexpected_msg(:handle_info, 2, msg)
      {:noreply, socket}
    end
  end

    """
  end

  defp warn_unexpected_msg(fun, arity, msg, channel) do
    proc =
      case Process.info(self(), :registered_name) do
        {_, []} -> self()
