This is the Lemma given in the book of Serge Lang Complex Analysis.
Lemma: Let $\alpha =ae^{i\varphi}$ with $|z|<a<R$. Prove that $$\int_o^{2\pi} \text{log}\left|e^{i\theta}-\frac{a}{R}e^{i\varphi} \right|d\theta=0.$$
In the proof of this lemma it says that, for $a<R$, the function $$\frac{\log(1-\frac{a}{R}z)}{z}$$ is analytic on $|z|\leq 1$, and the desired integral is $0$.
Question: How does $$\text{log}\left|e^{i\theta}-\frac{a}{R}e^{i\varphi} \right|$$ became $$\frac{\log(1-\frac{a}{R}z)}{z}?$$ What I know is that we are going to change $\theta$ into $z$ but I really cant figure it out.
Factor out an $e^{i\theta}$
$$\log|e^{i\theta} - ce^{i\psi}| = \log|e^{i\theta}(1 - ce^{i(\psi-\theta)})|$$
$$ = \log|e^{i\theta}| + \log|1 - ce^{i(\psi-\theta)}|$$
Now let $z=e^{i(\psi-\theta)}$. Then $dz =e^{i(\psi-\theta)}(-i)d\theta$. Or... $i\dfrac{dz}{z} = d\theta$.
So your integral becomes
$$i\int_{\exp(i\psi)}^{\exp(i(\psi-2\pi))}\dfrac{\log|e^{i\psi}z^{-1}| + \log|1-cz|}{z} dz$$