I recently came across the statement (without further explanation) that the net charge in a two dimensional system has to be zero. Obviously in two dimensions, the electric field $\vec{E}$ due to a point charge is inversely proportional to the distance to the charge: $$\vec{E} \propto \frac{\hat{r}}{r}. $$ If we compute the negative line integral of $\vec{E}$ in the radial direction from some $r' = r_0$ to $r' = r$, we get the electric potential $$V(r) = -\int_{r_0}^{r}\vec{E} \cdot d\hat{r} \propto -\ln(r/r_0).$$
Obviously this diverges for $r \to \infty$, but I'm not sure that itself is a problem.
My feeling is that the problem is that a nonzero net charge would lead to infinite electrostatic potential energy, but I'm not sure how to prove that.
Another idea was to consider the energy density $|\vec{E}|^2 \propto 1/r^2$. This would give a total energy proportional to $$\int_{0}^{\infty}\frac{1}{r}dr$$ which diverges. The problem is of course that the corresponding integral in three dimensions, $$\int_{0}^{\infty}\frac{1}{r^2}dr$$ also diverges, so it doesn't seem like a very good argument.
However, we can note that the integral in two dimensions diverges at $\infty$, whereas the integral in three dimensions diverges at $0$.
Any input on this?
EDIT: Here is a translation of the text where it is mentioned. For context: It has just been shown that for an infinite straight line charge with charge density $\lambda$ the potential difference $V(a)-V(b)$ is given by $$V(a)-V(b) = \frac{\lambda}{2\pi\epsilon_0}\ln(b/a).$$
Then comes the following comment: An infinite straight line charge is often called a two dimensional point charge. The electric potential due to the two dimensional point charge at $\vec{r}'$ is usually defined as $$V(\vec{r}) = \frac{\lambda}{2\pi\epsilon_0}\ln(1/|\vec{r}-\vec{r}'|),$$ where $\vec{r} = (x,y), \vec{r}'=(x',y').$ It is seen that the dimension of the argument of the logarithm function is inverse length, which might seem strange.The explanation is that in two dimensional problems the total charge has to be zero. This means that the logarithm functions [due to different point charges] of the electric potential can always be combined in such a way that the argument is dimensionless, such as in $\ln(b/a).$