Proving that $\int_{-\pi}^{\pi} \ln |1 - e^{i\theta}| d\theta = 0$ I found this on some comprehensive exam.

Prove that $\int_{-\pi}^{\pi} \ln |1 - e^{i\theta}| d\theta  = 0$.

I was wondering would standard approach work? By that I just mean splitting the integerl up into 
$\int_{-\pi}^{0} + \int_{0}^{\pi}$, and then use $$\ln(1 - e^{i\theta}) = -\sum\frac{e^{i\theta n}}{n}.$$
I found that the first integral yields $-\frac{2}{i n^2}$ and the second yields the negative of that, which yields $0$. But I feel like this is a real-analysis approach. 
Can someone give me some insight?
 A: Assume $|a|<1$, $\theta \in (-\pi,\pi)$. You may write
$$
\int_{-\pi}^{\pi}\ln(1 - ae^{i\theta}) \:d\theta= -\int_{-\pi}^{\pi}\sum_{n\geq1}a^n\frac{e^{i\theta n}}{n}\:d\theta=-\sum_{n\geq1}\frac{a^n}n\int_{-\pi}^{\pi}e^{i\theta n}\:d\theta=-\sum_{n\geq1}\frac{a^n}n \times 0=0,
$$ where the termwise integration may be justified by the following uniform bound:
$$
\left|\sum_{n=1}^{\infty}\frac{a^n}{n} e^{i\theta n}\right|\leq \sum_{n=1}^{\infty}\frac{|a|^n }{n}=-\log(1- |a|)<\infty.
$$
A: Use the Gauss mean value theorem to prove $\int_{-\pi}^\pi \ln|1 - re^{i\theta}|\, d\theta = 0$ for $0 < r < 1$. Then show that $\int_{-\pi}^\pi \ln|1 - e^{i\theta}|\, d\theta  = \lim\limits_{r\to 1^{-}} \int_{-\pi}^\pi \ln|1 - re^{i\theta}|\, d\theta$.
A: Cut the complex plane with a line from $(1,0)$ and extending along the positive real axis.  
Now, $\log(1-z)$ is analytic within and on a closed contour $C$ defined by $z=e^{i\phi}$ for $\epsilon \le \phi \le 2\pi -\epsilon$, and $z=1+2\sin(\epsilon/2) e^{i\nu}$ for $\pi/2 + \gamma \le \nu \le 3\pi/2 -\gamma$, where $
\cos(\gamma)=\frac{\sin \epsilon}{\sqrt{2(1-\cos \epsilon)}}$ and $0 \le \gamma <2\pi$ on this branch of $\gamma$.
Then, from the residue theorem, we have 
$$\int_C  \frac{\log(1-z)}{z}dz=2\pi i \log(1-0)=0$$
which implies 
$$\begin{align}
\int_C \frac{\log(1-z)}{z} dz&=\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi})i d\phi+\int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2) e^{i\nu})}{1+2\sin(\epsilon/2) e^{i\nu}}i2\sin(\epsilon/2) e^{i\nu}d\nu\\\\
&=i\int_{\epsilon}^{2\pi-\epsilon} \log(1-e^{i\phi}) d\phi+ i2\sin(\epsilon/2)  \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}}   \\\\
&=i\int_{\epsilon}^{2\pi-\epsilon} \log|1-e^{i\phi}| d\phi + \int_{\epsilon}^{2\pi-\epsilon} \arctan \left(\frac{\sin \phi}{1-\cos \phi}\right)d\phi \\\\
&+ i2\sin(\epsilon/2)  \int_{3\pi/2-\gamma}^{\pi/2+\gamma} \frac{\log(-2\sin(\epsilon/2)e^{i\nu})e^{i\nu}d\nu}{1+2\sin(\epsilon/2)e^{i\nu}}   \\\\
&=0
\end{align}$$
As $\epsilon \to 0$ the first term on the RHS approaches $i$ times the integral of interest.  The second term approaches zero since $\arctan(\frac{\sin \phi}{1-\cos \phi})$ is an odd, periodic function of $\phi$ and the integration extends over the entire period.  And the last term approaches $0$ since $x\log x \to 0$ as $x \to 0$.  Thus, the integral of interest is zero!
A: The integrator is the real-part of the function $z\mapsto\log(1-z)$ restricted to the unit circle. Hence, given $\delta>0$ we can find $\varepsilon>0$ around $z=1$ such that $$-\delta<\int_{-\pi+\varepsilon}^{\pi^-\varepsilon}\log|1-e^{i\theta}|d\theta < \delta $$ 
Next, 
$$\int_{-\varepsilon}^\varepsilon \log|1-e^{i\theta}|d\theta\sim \varepsilon \log|1-e^{i\theta}| \to 0 \text{ as $\varepsilon \to0$}$$
A: Assume $|r|<1$. Let $z=e^{i\theta}$ and then $dz=izd\theta$. Note $\ln(1-z)$ is analytic and hence, by Cauchy's Theorem, we have
$$
\int_{-\pi}^{\pi}\ln(1 - re^{i\theta}) \:d\theta= \int_{|z|=1}\frac{\ln(1-rz)}{iz}dz=2\pi\ln(1-rz)|_{z=0}=0.
$$ 
Letting $r\to1^-$ and taking the real part give the answer.
