Solution (source code)

= Solution

Use the principal <branch of the complex logarithm> for $\operatorname{Log}(z+i)$. Its <branch cut> is the ray $z=-i-s$, $s\geq0$, lying below the real axis. Thus it is analytic in the upper half-plane, where the only <pole> of the integrand is $z=i$.

Close the real interval by a large upper semicircle. The <estimation lemma> bounds the arc integral by $O(\ln R/R)$, so it vanishes. The simple-pole <residue> is
$$
\operatorname{Res}_{z=i}\frac{\operatorname{Log}(z+i)}{z^2+1}=\frac{\operatorname{Log}(2i)}{2i}=\frac{\ln2+i\pi/2}{2i}.
$$
The <residue theorem> then gives
$$
\int_{-\infty}^{\infty}\frac{\operatorname{Log}(x+i)}{x^2+1}dx=\pi\ln2+\frac{i\pi^2}{2}.
$$
For real $x$, $\operatorname{Re}\operatorname{Log}(x+i)=\tfrac12\ln(x^2+1)$. Taking real parts and then using evenness of the real integrand yields
$$
\boxed{\int_0^\infty\frac{\ln(x^2+1)}{x^2+1}dx=\pi\ln2.}
$$
Both endpoints converge: the integrand is $O(x^2)$ near zero and $O(\ln x/x^2)$ at infinity. This also agrees with the <logarithmic parameter integral with Cauchy weight> at parameter one.