An improper integral : $\int_{0}^\infty {\ln(a^2+x^2)\over{b^2+x^2}}dx$ How to evaluate the following improper integral:$$\int_{0}^\infty {\ln(a^2+x^2)\over{b^2+x^2}}dx,$$ where $a,b>0$.

I tried to suppose $$f(a)=\int_0^\infty {\ln(a^2+x^2)\over{b^2+x^2}}dx,$$ based on the convergence theorem, and then I tried $${df(a)\over da}=\int_0^\infty {2a\over {(a^2+x^2)(b^2+x^2)}}dx = {\pi\over b(b+a)},$$and then $$f(a)={\pi\over b}\ln(b+a)+C,$$where $C$ is a constant, but I don't know how to find the constant $C$. Could anyone tell me that, and explain why? Or could anyone find other methods to evaluate the integral? If you could, please explain. Thanks.

Another approach using contour integration is to consider the function $$ f(z) = \frac{\ln(z+ia)}{b^{2}+z^{2}} \, , \quad  a, b >0.$$
Since the branch point of $f(z)$ is in the lower half-plane, we can integrate $f(z)$ around a contour consisting of the line segment $[-R,R]$ and the upper half of the circle $|z|=R$.
Letting $R \to \infty$, the integral vanishes along the upper half of the circle $|z|=R$.
So we have
$$ \begin{align} \int_{0}^{\infty} \frac{\ln(a^{2}+x^{2})}{b^{2}+x^{2}} \, dx &=  \text{Re}   \int_{-\infty}^{\infty} \frac{\ln(x+ia)}{b^{2}+x^{2} } \, dx \\ &= \text{Re}\,  \left( 2\pi i \ \text{Res}[f(z),ib] \right) \\ &= \frac{\pi}{b} \,   \ln(a+b)  . \end{align}$$
