First note that
$$2 \int^1_0 \frac{\cos(\log x) }{x^2+1}\,dx = \int^\infty_0 \frac{\cos(\log x)}{x^2+1}\,dx$$
Integrate the following function
$$f(z) = \frac{e^{i\log(z)}}{z^2+1}$$
Around a semi-circle in the upper half place. Where we avoid the branch point at $z=0$ by a semi-circle. We assume that the branch cut is taken on the negative imaginary axis.

$$\int^{-r}_{-R}f(z) \,dz +\int^{R}_{r}f(z) \,dz+ \int_{C_R}f(z)\,dz+\int_{c_r}f(z)\,dz =2\pi i \mathrm{Res}(f,i)$$
The integral on semi-circles
\begin{align}\left|\int_{C_R} \frac{e^{i\log(z)}}{z^2+1}\right|
&\leq R \int^{\pi}_0 \left|\frac{e^{i \log(R e^{it})}}{R^2e^{2it}+1}\right| dt\\
&\leq R \int^{\pi}_0 \frac{e^{i \log R-t}}{|R^2-1|} dt\\
&\leq \frac{R}{R^2-1} \int^{\pi}_0 e^{-t} dt\\
&\leq \frac{R(1-e^{-\pi})}{R^2-1} dt \sim_{\infty} 0
\end{align}
Similarily
$$\lim_{r \to 0}\int_{C_r} \frac{e^{i\log(z)}}{z^2+1} = 0$$
Hence we have as $ R \to \infty , r \to 0 $
$$\int_{-\infty}^0 \frac{e^{i\log|x|-\pi}}{x^2+1}\,dx +\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =2\pi i \mathrm{Res}(f,i)$$
$$(1+e^{-\pi})\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =2\pi i \mathrm{Res}(f,i)$$
Note that
$$\mathrm{Res}(f,i) = \frac{e^{i\log(i)}}{2i} = \frac{e^{-\pi/2}}{2i}$$
Hence
$$\int^\infty_0 \frac{e^{i\log(x)}}{x^2+1}\,dx =\pi \frac{e^{-\pi/2}}{1+e^{-\pi}} = \frac{\pi}{e^{\pi/2}+e^{-\pi/2}} = \frac{\pi}{2}\mathrm{sech}\left( \frac{\pi}{2}\right)$$
Which implies that
$$\int^\infty_0 \frac{\cos(\log x)}{x^2+1}\,dx = \frac{\pi}{2}\mathrm{sech}\left( \frac{\pi}{2}\right)$$
Hence we have our result
$$\int^1_0 \frac{\cos(\log x)}{x^2+1}\,dx =
\frac{\pi}{4}\mathrm{sech}\left( \frac{\pi}{2}\right)$$
The Tikz code for the contour drawing
\begin{tikzpicture}[decoration={markings,
mark=at position 0.5cm with {\arrow[line width=1pt]{>}},
mark=at position 2cm with {\arrow[line width=1pt]{>}},
mark=at position 3.85cm with {\arrow[line width=1pt]{>}},
mark=at position 7cm with {\arrow[line width=1pt]{>}}
}
]
% The axes
\draw[help lines,->] (-3,0) -- (3,0) coordinate (xaxis);
\draw[help lines,->] (0,-1) -- (0,3) coordinate (yaxis);
% The path
\path[draw,line width=0.8pt,postaction=decorate] (-2,0) node[below] {$\minus
R$} -- (-0.5,0) node[below] {$\minus r$} -- (-0.5,0) arc (180:0:0.5) --
(0.5,0) node[below] {$r$} -- (2,0) node[below] {$R$} arc (0:180:2);
% The labels
\node[below] at (xaxis) {$x$};
\node[left] at (yaxis) {$y$};
\node at (0.5,0.7) {$c_{r}$};
\node at (0.5,2.3) {$C_{R}$};
\node at (-0.2,1) {$i$};
\draw[red,fill=red] (0,0) circle (.3ex);
\draw[green,fill=green] (0,1) circle (.3ex);
\end{tikzpicture}