This is question VI.2.14a in Lang, 3rd edition. The contour it's being taken on is a closed half annulus counterclockwise, from a value R on the real axis along a semicircle to -R along a straight line on the real axis to -$\delta$ along a semicircle to $\delta$ then along a straight line back to R.
Shakarchi defines a function $f(z)=\frac{(\ln{z}-i\pi/2)^2}{1+z^2}$.
I'm having trouble understanding why the integral of $f(z)$ along the semicircles is 0 - he explains that it's something about the length of the semicircle behaving like log functions, but that doesn't make sense to me.
Any help would be really appreciated!
It's more obvious why the larger semicircle goes to $0$ than the smaller one. For the smaller one, note that
$$\Bigr|\int_\delta f(z)dz\Bigr| \leq \pi \delta \cdot \left(\frac{|\log \delta^2| + r \pi}{1+0^2}\right) \to 0$$
where $r\in\mathbb{Q}$ is dependent on your choice of branch cut. This limit holds because $x\ln x \to 0$ as $x\to 0$