How to evaluate integral $\int_{\gamma}\frac{\ln(z-1/2)}{z-1/2}dz$ by residues? The contour is a unit circle with a breach on principal branch, $\theta\in[0,2\pi)$.
I know how to calculate $\int_{\gamma}\frac{\ln(z-1/2)}{z-1/2}$ by a boring approach, i.e., replace $z$ by $e^{i \theta}$, then integrate $\theta$ from $0$ to $2\pi$,
$$
i\int^{2\pi}_0\frac{\ln(e^{i\theta}-1/2)}{e^{i\theta}-1/2} e^{i\theta}d\theta=2 i \pi  \log \left(\frac{3}{2}\right).
$$
Could someone show me how to evaluate it by residue, or some other interesting methods?
 A: This function has no isolated singularities, so residues aren't going to help. Nevertheless, we can still use contour integration.
Let $\gamma_\epsilon$ be the unit circle with a small section removed in the left half-plane where the imaginary part is less than $\epsilon$. Consider a contour that follows $\gamma_\epsilon$, then goes straight right to $Re[z] = -1/2$, makes a semicircle of radius $\epsilon$ around $1/2$, and then goes straight left to hook up with $\gamma_\epsilon$. The function is holomorphic on the interior of this contour, so we have
$$
\int_{\gamma_\epsilon} \frac{\ln(z-1/2)}{z-1/2}dz + \int_{-1}^{1/2}\frac{\ln(x -1/2 + i\epsilon)}{x -1/2 + i\epsilon}dx -i\int_{-\pi/2}^{\pi/2}\ln(\epsilon e^{i\theta})d\theta-\int_{-1}^{1/2}\frac{\ln(x -1/2 - i\epsilon)}{x -1/2 - i\epsilon}dx = 0.
$$
These integrals can be done analytically, giving
\begin{multline}
\int_{\gamma_\epsilon} \frac{\ln(z-1/2)}{z-1/2}dz  =i\pi\ln(\epsilon)+\int_{0}^{3/2}\frac{\ln(u - i\epsilon) + i\pi}{u - i\epsilon}du -\int_{0}^{3/2}\frac{\ln(u + i\epsilon)-i\pi}{u + i\epsilon}dx
\\= i\pi\ln(\epsilon)+i\pi\int_0^{3/2}\frac{2u\,du}{u^2 +\epsilon^2} -i\int_0^{3/2}\frac{2u\tan^{-1}(\epsilon/u)+ \epsilon\ln(u^2+\epsilon^2)}{u^2 + \epsilon^2}du
\\ = i\pi \ln(\epsilon)+i\pi \left.\ln(u^2+\epsilon^2)\right|_0^{3/2} -i\left.\tan^{-1}\left(\frac{\epsilon}{u}\right)\ln(u^2+\epsilon^2)\right|_0^{3/2} 
\\ = i\left[\pi-\tan^{-1}\left(\frac{2\epsilon}{3}\right)\right]\ln\left(\frac{9}{4}+\epsilon^2\right).
\end{multline}
Finally, we take the limit as $\epsilon\rightarrow 0$:
$$
\int_{\gamma} \frac{\ln(z-1/2)}{z-1/2} = \lim_{\epsilon\rightarrow 0}\int_{\gamma_\epsilon} \frac{\ln(z-1/2)}{z-1/2}dz = \lim_{\epsilon\rightarrow 0}i\left[\pi-\tan^{-1}\left(\frac{2\epsilon}{3}\right)\right]\ln\left(\frac{9}{4}+\epsilon^2\right) = 2i\pi\ln\left(\frac{3}{2}\right).
$$
