Calculating $\int_0^{\infty } \frac{\ln (x)}{\sqrt{x} \left(a^2+x^2\right)^2} \, \mathrm{d}x$ using contour integration I can do this integral using the keyhole contour the answer is:$$\int_0^{\infty } \frac{\ln (x)}{\sqrt{x} \left(a^2+x^2\right)^2} \, \mathrm{d}x = -\frac{\pi  (-6 \ln (a)+3 \pi +4)}{8 \sqrt{2}a^{7/2}}$$
but I want to calculate it with the substitution $x = ae^t$ which turns the integral into:
$$ 
\frac{1}{a^\frac{7}{2}}\times\int_{-\infty }^{\infty } \frac{e^{\frac{t}{2}} (\ln (a)+t)}{(e^{2t}+1)^2} \, \mathrm{d}t $$
now  I think this integral should be done using the contour $-R$ to $R$, to $R+πi$, to $-R + πi$, to $-R$.
But at this point, I'm a bit lost as to what to do with the Residue in $z=i\pi/2$.

This answer is based on Feynman's trick/differentiation under the integral sign.
Well, we may just compute:
$$I(\alpha)=\int_{0}^{+\infty}\frac{x^{\alpha-1/2}}{(x^2+1)^2}\,dx \tag{1}$$
through the substitution $\frac{1}{x^2+1}=u$, Euler's beta function and the $\Gamma$ reflection formula to get:
$$ I(\alpha) = \frac{\pi}{8}\cdot\frac{3-2\alpha}{\sin\left(\frac{(2\alpha+1)\pi}{4}\right)}\tag{2}$$
for any $\alpha$ such that $\text{Re}(\alpha)\in\left(-\frac{1}{2},\frac{7}{2}\right)$. However, assuming $a\in\mathbb{R}^+$
$$\begin{eqnarray*} \int_{0}^{+\infty}\frac{\log(x)}{\sqrt{x}(x^2+a^2)^2}&=&\frac{1}{a^{7/2}}\int_{0}^{+\infty}\frac{\log(a)+\log(x)}{\sqrt{x}(x^2+1)^2}\,dx\\[0.2cm]&=&\color{red}{\frac{1}{a^{7/2}}\left(I(0)\log(a)+I'(0)\right)}\tag{3}\end{eqnarray*}$$
where:
$$ I(0) = \frac{3\pi}{4\sqrt{2}},\qquad I'(0)=-\frac{\pi(4+3\pi)}{8\sqrt{2}}\tag{4}$$
are straightforward to compute through $(2)$.
