Question: We have to find the integration of 

$$\int ^{\infty}\_0 \frac{\ln x}{x^2 + 2x+ 4}dx$$

In this I tried to do substitution of $x=e^t$

After that got stuck .

Answer: 
May be this will be a more elementary solution.

Let us start with a the substitution $x=2y$. Then
\begin{gather\*}
I = \int\_{0}^{\infty}\dfrac{\ln(x)}{x^2+2x+4}\, dx = \int\_{0}^{\infty}2\dfrac{\ln(2y)}{4y^2+4y+4}\, dy =\\[2ex] \dfrac{1}{2}\int\_{0}^{\infty}\dfrac{\ln(2)}{y^2+y+1}\, dy + \dfrac{1}{2}\int\_{0}^{\infty}\dfrac{\ln y}{y^2+y+1}\, dy=
\dfrac{\ln(2)}{2}I\_1+ \dfrac{1}{2}I\_2\tag{1}
\end{gather\*}
where
\begin{equation\*}
I\_1 = \int\_{0}^{\infty}\dfrac{1}{y^2+y+1}\, dy =\dfrac{4}{3}\int\_{0}^{\infty}\dfrac{1}{\left(\frac{2y+1}{\sqrt{3}}\right)^{2}+1}\, dy = \dfrac{2}{\sqrt{3}}\left[\arctan\left(\dfrac{2y+1}{\sqrt{3}}\right)\right]\_{0}^{\infty} = \dfrac{2\pi}{3\sqrt{3}}\tag{2}
\end{equation\*}
and
\begin{equation\*}
I\_2 = \int\_{0}^{\infty}\dfrac{\ln(y)}{y^2+y+1}\, dy =\left[y=\dfrac{1}{z}\right] = \int\_{0}^{\infty}\dfrac{-\ln(z)}{z^2+z+1}\, dz = -I\_2. \tag{3}
\end{equation\*}
But (3) implies that $I\_2=0$. This and (2) substituted in (1) give us $I = \dfrac{\pi\ln(2)}{3\sqrt{3}}$.
Let $I$ be defined by the integral 

$$I=\int\_0^\infty \frac{\log(x)}{x^2+2x+4}\,dx \tag1$$

and let $J$ be the contour integral 

$$J=\oint\_{C}\frac{\log^2(z)}{z^2+2z+4}\,dz \tag2$$

where the contour $C$ is the classical "key-hole" contour for which the keyhole coincides with the branch cut along the positive real axis. 

Then, we can write $(2)$ as

$$\begin{align}
J&=\int\_0^R \frac{\log^2(x)}{x^2+2x+4}\,dx-\int\_0^R \frac{(\log(x)+i2\pi)^2}{x^2+2x+4}\,dx+\int\_{C\_R}\frac{\log^2(z)}{z^2+2z+4}\,dz\\\\
&=-i4\pi \int\_0^R \frac{\log(x)}{x^2+2x+4}\,dx+4\pi^2\int\_0^R\frac{1}{x^2+2x+4}\,dx+\int\_{C\_R}\frac{\log^2(z)}{z^2+2z+4}\,dz\tag 3
\end{align}$$

As $R\to \infty$ the integral over $C\_R$ vanishes and we have from $(1)$

$$\lim\_{R\to \infty}J=-i4\pi I +4\pi^2\int\_0^\infty\frac{1}{x^2+2x+4}\,dx\tag 4$$

---

Next, we apply the residue theorem to evaluate the left-hand side of $(4)$. Proceeding we find that 

$$\begin{align}
\lim\_{R\to \infty}J&=2\pi i \text{Res}\left(\frac{\log^2(z)}{z^2+2z+4}\,dz, z=-1\pm i\sqrt{3}\right)\\\\
&=2\pi i \left(\frac{(\log(2)+i2\pi/3)^2}{i2\sqrt{3}}+\frac{(\log(2)+i4\pi/3)^2}{-i2\sqrt{3}}\right)\\\\
&=-\frac{i4\pi^2\log(2)}{3\sqrt{3}}+\frac{4\pi^3}{3\sqrt{3}}\tag 5
\end{align}$$

Equating real and imaginary parts of $(3)$ and $(5)$ reveals

> 
> $$\int\_0^\infty \frac{\log(x)}{x^2+2x+4}\,dx =\frac{\pi \log(2)}{3\sqrt{3}}$$
> 
> 
> 

and as a bonus

$$\int\_0^\infty\frac{1}{x^2+2x+4}\,dx=\frac{\pi}{3\sqrt{3}}$$

And we are done!