You need toThe cited authors assume that there are only three linearly independent summation invariants,$^\ast$ $Q_1(\mathbf{v})=1$, $Q_2(\mathbf{v})=\mathbf{v}$, and $Q_3(\mathbf{v})=|\mathbf{v}|^2$. Then by definition, if the function $\log f(\mathbf{v})$ is a summation invariant, it must be a linear combination of $Q_1$, $Q_2$, and $Q_3$ [otherwise, $\log f$ would be a fourth independent summation invariant, counter to the assumption].
This assumption that $Q_1$, $Q_2$, and $Q_3$ are the only linearly independent summation invariants is phrased in the cited text as "the only conserved quantities are energy and momentum and constants". If the physics of the problem allows for a fourth summation invariant, for example $Q_4=|\mathbf{v}|$, then $\log f$ could also contain terms linear in $|\mathbf{v}|$.
$^\ast$ A summation invariant is a function $F(\mathbf{v})$ which is conserved upon collision, $F(\mathbf{v}_1)+F(\mathbf{v}_2)=F(\mathbf{v}'_1)+F(\mathbf{v}'_2)$.