This comes from my answer here. Let
$$I = \int_0^{\infty} dx \frac{\log{x}}{x^2-1}$$
Note that the singularity at $x=1$ is removable in this integral and therefore we do not need to use a Cauchy principal value. We evaluate this integral by once again appealing to the residue theorem, but this time, we consider
$$\oint_{C'} dz \frac{\log^2{z}}{z^2-1}$$
where $C'$ is a keyhole contour with respect to the positive real axis. By integrating around this contour and noting that the integrand vanishes sufficiently fast as the radius of the circular section of $C'$ increases without bound, we get
$$\oint_{C'} dz \frac{\log^2{z}}{z^2-1} = -i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{x^2-1} + 4 \pi^2 \int_0^{\infty} dx \frac{1}{x^2-1}$$
This is equal to, by the residue theorem, $i 2 \pi$ times the sum of the residues of the poles of the integrand of the complex integral within $C'$. As the only pole is at $z=-1$, we see that
$$\begin{align}\oint_{C'} dz \frac{\log^2{z}}{z^2-1} &= i 2 \pi \frac{\log^2{(-1)}}{2 (-1)} \\ &= i 2 \pi \frac{\pi^2}{2}\end{align}$$
Now, the real part of the integral above is split into a Cauchy principal value and a piece indented about the singularity at $x=1$. The Cauchy principal value is zero:
$$\begin{align}PV \int_0^{\infty} dx \frac{1}{x^2-1} &= \lim_{\epsilon \rightarrow 0} \left [\int_0^{1-\epsilon} dx \frac{1}{x^2-1} + \int_{1+\epsilon}^{\infty} dx \frac{1}{x^2-1}\right]\\ &= \lim_{\epsilon \rightarrow 0} \left [\int_0^{1-\epsilon} dx \frac{1}{x^2-1} + \int_0^{1/(1+\epsilon)} \left (-\frac{dx}{x^2} \right ) \frac{1}{(1/x^2)-1} \right ]\\ &= \lim_{\epsilon \rightarrow 0} \left [\int_0^{1-\epsilon} dx \frac{1}{x^2-1} - \int_0^{1-\epsilon} \frac{dx}{x^2-1} \right ] \\ &= 0\end{align}$$
The indent in the contour, however, produces a contribution; let $x=1+\epsilon e^{i \phi}$ and $\phi \in [\pi,0]$:
$$4 \pi^2 i \epsilon \int_{-\pi}^0 d\phi \frac{e^{i \phi}}{2 \epsilon e^{i \phi}} = i \frac{\pi}{2} 4 \pi^2$$
so that
$$-i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{x^2-1} = i 2 \pi \frac{\pi^2}{2} - i \frac{\pi}{2} 4 \pi^2 = -i 2 \pi \frac{\pi^2}{2}$$
Therefore
$$I = \int_0^{\infty} dx \frac{\log{x}}{x^2-1} = \frac{\pi^2}{4}$$
But the sought-after integral is
$$\int_0^{1} dx \frac{\log{x}}{x^2-1} = \frac12 I = \frac{\pi^2}{8}$$