TITLE: Evaluate $\int_0^{\infty} \frac{\log x }{(x-1)\sqrt{x}}dx$ (solution verification)
QUESTION [13 upvotes]: I tried to find the integral
$$I=\int_0^{\infty} \frac{\log x }{(x-1)\sqrt{x}}dx \tag1$$
I substituted $x=t^2, 2tdt=dx$ and chose $\log x$ and $\sqrt{x}$ to be principal values. We have
$$\int_0^{\infty} \frac{\log x}{(x-1)\sqrt{x}}dx=2 \int_0^{\infty} \frac{\log t^2}{(t^2-1)}dt \tag2$$ 
Then because it is an even function
$$2 \int_0^{\infty} \frac{\log t^2}{(t^2-1)}dt=2 \int_{-\infty}^{\infty} \frac{\log t}{(t^2-1)}dt \tag3$$
In the complex plane $z=1$ is a removable singularity of this function and $z=-1$ is a pole. So I chose the contour 
$$\oint_\gamma = \int_{-R}^{-1-r}+ \int_{C_1}+\int_{-1+r}^{R}+\int_{C_2}=0 \tag4$$
where $C_1$ is a semi-circle $z=-1+r e^{i\phi}, \pi \ge \phi \ge 0$ and $C_2$ a semi-circle $z=R e^{i\phi}, 0 \le \phi \le \pi$. In the limit $R\to\infty, r\to 0$ the integral on $C_2$ is $0$ and $\int_{-R}^{-1-r}+\int_{-1+r}^{R}=\int_{-\infty}^{\infty}$ so we need to find
$$\lim_{r\to0} \int_{C_1} \frac{\log z}{(z^2-1)}dz = 0 \tag5$$
So $I$ should be zero. But if we compare with this question, we see it isn't. Where is my mistake?

EDIT 2: For clarity, I will compile all my corrections as an answer. Thanks to everyone who helped in the comments (and the other answers, too, of course)!

REPLY [2 votes]: It's much easier to use a quarter circle contour (easy enough to do the problem correctly in your head), because we can then use that $$\int_0^{\infty}\frac{\log(x)}{1+x^2}dx = 0$$
which is easy to see by splitting up this integral from zero to 1  and from 1 to infinity and then substituting $x = 1/t$ in the latter part. 
Since the contour integral equals zero by Cauchy's theorem, and the integral along the quarter circle tends to zero, this means that the sum of the desired integral equals $2\pi$ times the integral of $1/(x^2+1)$ from zero to infinity which equals to $\pi^2$.