Note that the integral is
$$2 \operatorname{Re}{\int_0^{\pi/2} dx \, \log{(\log{\cos{x}} + i x)}} $$
which, by using various manipulations of the integrand around the unit circle, we find to be
$$\frac12 \operatorname{Re}{\int_{-\pi}^{\pi} dx \, \log{(\log{\cos{x}} + i x)}} $$
which integral we may express as an integral over a slightly deformed unit circle:
$$-\frac{i}{2} \oint_C \frac{dz}{z} \log{\left [\log{\left(\frac{z+z^{-1}}{2} \right)}+\log{z} \right ]} = -\frac{i}{2} \oint_C \frac{dz}{z} \log{\left [\log{\left(\frac{z^2+1}{2} \right)} \right ]}$$
where $C$ is the unit circle with small semicircular indentations at the poles $z=\pm i$. The contributions from these indentations to the integral is zero as the radius of the indentations goes to zero.
Thus, we have the integral of a holomorphic function over the boundary of a region in which there is a single, simple pole at the origin. By Cauchy's theorem/ the residue theorem, the integral we seek is thus the real part of
$$i 2 \pi \left (-\frac{i}{2} \right ) \log{\log{\frac12}} $$
or $\pi \log{\log{2}} $.
ADDENDUM
Let me fill in the gaps. Imagine
$$I = \int_{0}^{\pi/2} dx \, \log{(\log{\cos{x}} + i x)}$$
and
$$\begin{align}I' &= \int_{\pi/2}^{\pi} dx \, \log{(\log{\cos{x}} + i x)} \\ &= \int_{0}^{\pi/2} dx \, \log{\left [\log{\left (-\cos{\left (\frac{\pi}{2} - x \right )}\right )} + i x+i \frac{\pi}{2}\right ]} \\ &= \int_{0}^{\pi/2} dx \, \log{\left [\log{\left (\cos{x}\right )} - i \pi + i \left (\frac{\pi}{2}-x \right )+i \frac{\pi}{2}\right ]}\\ &= \int_{0}^{\pi/2} dx \, \log{(\log{\cos{x}} - i x)}\end{align}$$
Then
$$I+I' =\int_0^{\pi} dx \, \log{(\log{\cos{x}} + i x)}= \int_0^{\pi/2} dx \, \log{(\log^2{\cos{x}}+x^2)} $$
Thus,
$$\operatorname{Re}{\int_{-\pi}^{\pi} dx \, \log{(\log{\cos{x}} + i x)}} = 2 \int_0^{\pi/2} dx \, \log{(\log^2{\cos{x}}+x^2)}$$
as was to be shown.