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)!
Furthermore, where exactly is your branch cut located?
– tired Nov 19 '14 at 21:24