Note that for $|a|=1$, we can write $a=e^{i\psi}$. Then, exploiting the $2\pi$-periodicity of the integrand, we have
$$\begin{align}
\int_{-\pi}^\pi \log|1-ae^{i\theta}|\,d\theta&=\int_{-\pi}^\pi \log|1-e^{i(\theta+\psi)}|\,d\theta\\\\
&=\int_{-\pi+\psi}^{\pi+\psi} \log|1-e^{i\theta}|\,d\theta\\\\
&=\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta
\end{align}$$
METHODOLOGY 1:
Note that we have $|1-e^{i\theta}|=\sqrt{2(1-\cos(\theta))}=2|\sin{\theta/2}|$. Now, we have
$$\int_0^{2\pi}\log|1-e^{i\theta}|\,d\theta=4\int_0^{\pi/2}\log(2\sin(\theta))\,d\theta=0$$
since $\int_0^{\pi/2}\log(\sin(\theta))\,d\theta=-\frac{\pi}{2}\log(2)$
METHODOLOGY 2:
Now, we cut the complex plane with a line from $(1,0)$ and extending along the positive real axis.
Note that $\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 -i \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, $2\pi$-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!
- Let $s \in \mathbb{C}$ with $\mathrm{Re}(s)>1$, and let $c>1$ such that $\mathrm{Re}(s)>c$. Notice that
\begin{align*}
\left| \sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{p^{-ms}}{m} \right| &=\left| \sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{1}{p^{ms}m} \right| \\ &\leq \sum_{\substack{p \text{ prime} \\ m \geq 1}} \left|\frac{1}{p^{ms}m} \right| \\
& = \sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{1}{p^{\mathrm{Re}(ms)}m} \\
& \underbrace{\leq }_{\mathrm{Re}(s)>c} \sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{1}{p^{mc}m}.
\end{align*}
Now, since the $k^{\text{th}}$ prime is greater than $k$
$$\sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{1}{p^{mc}m} \leq \sum_{\substack{k \geq 2 \\ m \geq 1}} \frac{1}{k^{mc}m} \leq \sum_{\substack{k \geq 2 \\ m \geq 1}} \frac{1}{k^{mc}}.$$
Finally,
\begin{align*}
\sum_{\substack{k \geq 2 \\ m \geq 1}} \frac{1}{k^{mc}} &=\sum_{k \geq 2} \left( \frac{1}{1-\frac{1}{k^{c}}}-1 \right) \\
&=\sum_{k \geq 2} \frac{1}{k^{c}-1} \\
&<\infty.
\end{align*}
By the Weierstrass $M$-test, this computation implies that $\sum \frac{p^{-ms}}{m}$ converges uniformly when $\mathrm{Re}(s)>1$.
Since the uniform limit of holomorphic functions is holomorphic, the previous step implies that $\log(\zeta(s))$ is holomorphic for $\mathrm{Re}(s)>1$. Then you can differentiate the series of $\log(s)$ term by term to obtain
$$ \frac{\zeta'(s)}{\zeta(s)}=\frac{d}{ds} \log(\zeta(s))=\sum_{m,p} \frac{d}{ds}\frac{p^{-ms}}{m}=-\sum_{m,p} (\log p) p^{-ms}.$$
The equality $-\sum_{m,p} (\log p) p^{-ms}=-\sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}}$ comes from the definition of the Von Mangoldt function:
$$\Lambda(n)=\begin{cases} \log p & \text{if }n=p^{m}, \\ 0 & \text{otherwise} \end{cases}.$$
Thus
$$\sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}}=\sum_{\substack{p \text{ prime} \\ m \geq 1}} \frac{\log p}{p^{ms}}.$$
I will show that $\sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}}$ converges uniformly using the Weiestrass $M$-test. As before, take $s$ with $\mathrm{Re}(s)>1$, and let $c>1$ such that $\mathrm{Re}(s)>c$. By definition of the Von Mangoldt function you have the following bound
\begin{align*}
\left| \sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}} \right| &\leq \sum_{n=1}^{\infty} \left| \frac{\Lambda(n)}{n^{s}} \right| \\
& =\sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{\mathrm{Re}(s)}} \\
& \leq \sum_{n=1}^{\infty} \frac{\log(n)}{n^{c}}.
\end{align*}
Since for any $A>0$ we have $\log(n)<\frac{n^{A}}{A}$, we obtain that
$$ \sum_{n=1}^{\infty} \frac{\log(n)}{n^{c}} \leq \frac{1}{A} \sum_{n=1}^{\infty} \frac{1}{n^{c-A}}.$$
If you choose $A$ such that $c-A>1$ (which exists because $c>1$), then you obtain that the RHS of this inequality is finite. So, in virtue of the Weiestrass $M$-test the series of holomorphic functions $\sum_{n=1}^{\infty} \frac{\Lambda(n)}{n^{s}}$ is uniformly convergent. This kind of convergence allow you to change the integral with the series.
Best Answer
For $|a|<1$, the branch cut for $\log{(1-a z)}$ is on the real axis, for $z > 1/|a|$. Thus, we can write
$$\oint_{|z|=1} dz \frac{\log{(1-a z)}}{z} = 0$$
because $\frac{\log{(1-a z)}}{z}$ has no poles within $|z| \le 1$. Substitute $z=e^{i \theta}$ to get
$$i \int_0^{2 \pi} d\theta \log{(1-a e^{i \theta})} = i \int_0^{2 \pi} d\theta \log{|1-a e^{i \theta}|} - \int_0^{2 \pi} d\theta \: \arg{(1-a e^{i \theta})} = 0$$
Equating real and imaginary parts, we get the desired result for $|a| < 1$. For $|a|=1$, the circle $|z|=1$ passes through the branch cut so that Cauchy's theorem does not apply. In this case, we indent the circle $|z|=1$ near $z=1$ by an arc $\gamma$ on the circle $|z-1|=r$ to produce a contour $\Gamma$ and consider the limit $r \rightarrow 0$. On $\gamma$, we may show that
$$\left | \frac{\log{(1-z)}}{z} \right | \le \frac{\log{\frac{1}{r}}}{1-r}$$
because, for very small $r$, $\arg{(1-z)} \approx 0$ and $|z| > 1-r$ on $\gamma$. The magnitude of the integral over $\gamma$ is thus bounded by
$$\left | \int_{\gamma} dz \frac{\log{(1-z)}}{z} \right | \le 2 r \frac{\log{\frac{1}{r}}}{1-r} \arccos{\frac{r}{2}} $$
which goes to zero in the limit of $r \rightarrow 0$.
We may then show that, on the indented contour $\Gamma$:
$$\oint_{\Gamma} dz \frac{\log{(1-z)}}{z} = 0$$
By the same reasoning as above (equating real and imaginary parts), we see that
$$\int_0^{2 \pi} d\theta \log{|1- e^{i \theta}|} = 0$$
and the desired result follows.
Interestingly, though, we may show this explicitly. Let $z=e^{i \theta}$, $dz/z = i d\theta$, then
$$i \int_0^{2 \pi} d\theta \log{(1-e^{i \theta})} = 0$$
Now
$$\log{(1-e^{i \theta})} = \log{|1-e^{i \theta}|} +i \arg{(1-e^{i \theta})}$$
It turns out that
$$\arg{(1-e^{i \theta})} = \arctan{\frac{\sin{\theta}}{1-\cos{\theta}}} = \arctan{(\cot{\frac{\theta}{2}})} = \frac{\pi}{2} - \frac{\theta}{2}$$
$$\int_0^{2 \pi} d\theta \: \arg{(1-e^{i \theta})}= \int_0^{2 \pi} d\theta \left ( \frac{\pi}{2} - \frac{\theta}{2} \right ) = \frac{\pi}{2} 2 \pi - \frac{1}{4} (2 \pi)^2 = 0 $$
$$\therefore \int_0^{2 \pi} d\theta \log{|1-e^{i \theta}|} = 0$$