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

    """
  end

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

    ref = make_ref()
    from = {self(), ref}
    child_spec = channel.child_spec({socket.endpoint, from})

    case starter.(socket.endpoint, socket.handler, from, child_spec) do
      {:ok, pid} ->
        send(pid, {Phoenix.Channel, payload, from, socket})
