I need to calculate the integral $$\frac{1}{2\pi}\int_{0}^{2\pi}\log{|a-e^{i\theta}|}d\theta$$
When $|a|> 1$, I can show it equals $\log|a|$. But I failed to handle the situation when $|a|\leqslant 1$. I know it should be $0$.
I tried to use $\log(a-z)$, but when $|a|\leqslant 1$, such $\log$ can not be defined. So anyone can help?
Updated: the second situation should be $|a|<1$.