Contour integral on the function $\frac{\log z}{z-z_0}$ Let the domain $O=\mathbb{C}-(-\infty,0)$, the point $z_0 \in O$ and the circle $\gamma=C(0,r<|z_0|)$ in the positive direction. Compute $\int_C \frac{\log z}{z-z_0} dz$. 
So far we didn't see the Residue theorem, so we cannot use this result to do the question. Instead he proposed to us to use the Cauchy formula, but I really don't know how it is possible. Do I have to use the primitive of $\log z$,i.e. $\log' z = \frac{1}{z}$? Is anyone could help me at this point.
 A: One can deform the contour around the branch cut along the negative real axis.  The contour $C'=C+C_1+C_2+C_3$  where (i) $C_1$ is a straight line segment that begins at $z=(-\sqrt{r^2-\epsilon^2},\epsilon)$ and ends at $z=(0,\epsilon)$, (ii) C_2 is a semi-circular arc, centered at the origin with radius $\epsilon$, traversed clockwise, and beginning at $(0,\epsilon)$ and ending at $(0,-\epsilon)$, and (iii) $C_3$ is a straight line segment that begins at $z=(0,\epsilon)$ and ends at $z=(-\sqrt{r^2-\epsilon^2},-\epsilon)$.
Note that since $|z_0|>r$, the integrand is analytic in and on $C'$.  Therefore, Cauchy's Integral Theorem guarantees that the integration over $C'$ is zero.  Alternatively, the integration over $C$ is equal to $-1$ times the integration over $C_1+C_2+C_3$.  Hence, we can write 
$$\begin{align}\oint_C \frac{\log(z)}{z-z_0}\,dz&=\lim_{\epsilon\to 0^+}\left(\int_{0}^{-\sqrt{r^2-\epsilon^2}}\frac{\log(t+i\epsilon)}{t+i\epsilon - z_0}\,dt+\int_{-\pi/2}^{\pi/2}\frac{\log(\epsilon e^{i\phi})}{\epsilon e^{i\phi}-z_0}\,i\epsilon e^{i\phi}\,d\phi+\int_{-\sqrt{r^2-\epsilon^2}}^0\frac{\log(t-i\epsilon)}{t-i\epsilon - z_0}\,dt\right)\\\\
&=\int_0^r \frac{\log(t)+i\pi}{t+z_0}\,dt-\int_0^r \frac{\log(t)-i\pi}{t+z_0}\,dt\\\\
&=2\pi i\int_0^r \frac{1}{t+z_0}\,dt\\\\
&=2\pi i \log\left(\frac{r+z_0}{z_0}\right)
\end{align}$$
