Using contour integration to evaluate $\int_{0}^{\infty} \frac{2 \cos (x) \ln (x) + \pi \sin (x)}{x^2+4} \, \mathrm dx$
I think this is a bit backwards. If you want the branch cut to be downwards (-ve imaginary axis, located at $\arg z = -\pi/2,3\pi/2,\cdots$) then you want a $(-\pi/2,3\pi/2)$ range for $\arg z$, agreed.
Now the discontinuity is at $-i$. Hence $\arg(-iz)$ is discontinuous at $(-i)(-i)=-1$. Accordingly we will take a $(-\pi,\pi)$ type interval.
- For $\mathbb R \ni z>0$ we have $\arg(-i\times z)=\arg(-i) = -i\pi/2$.
- For $\mathbb R \ni z<0$ we have $\arg(-i\times z)=\arg(i) = +i\pi/2$.
Your values are impossible, in that they are not a multiple of $2\pi$ out from the standard arguments.
You should be able to get the answer using these.