Hopefully, it's never too late :)
Just as an option - a short solution via the complex integration.
Using $\cos^2x=\frac{1+\cos2x}{2}$
$$I=\int_0^\infty\frac{\ln(\cos^2x)}{1+e^{2x}}dx =\int_0^\infty\frac{\ln(2+2\cos2x)}{1+e^{2x}}dx-2\ln2\int_0^\infty\frac{dx}{1+e^{2x}}$$
$$=\int_0^\infty\frac{\ln(1+e^{2ix})+\ln(1+e^{-2ix})}{1+e^{2x}}dx-\ln^22$$
$$I=2\Re\int_0^\infty\frac{\ln(1+e^{2ix})}{1+e^{2x}}dx-\ln^22=2\Re\,J-\ln^22\qquad(1)$$
To evaluate $J$ we consider the closed contour in the complex plane:

The integrand does not have poles inside the contour, therefore
$$\oint\frac{\ln(1+e^{2iz})}{1+e^{2z}}dz=0=J+I_R+\int_{i\infty}^0\frac{\ln(1+e^{2ix})}{1+e^{2x}}dx=J+I_R-i\int_0^\infty\frac{\ln(1+e^{-2t})}{1+e^{2it}}dt$$
where $I_R$ is the integral along the quarter-circle (of the radius $R\to\infty$), counter clockwise. The third integral includes integration along the small half-circles around the points $t=\pi i/2+2\pi i k, \,k=0,1,2...$, clockwise (the point $t=\pi i/2$ - as an example - is on the picture).
Integrating the third term by parts,
$$\oint=J+I_R+\frac{1}{2}\ln(1+e^{-2t})\ln(1+e^{-2it})\,\Big|_{t=0}^{t=\infty}+\int_0^\infty\frac{\ln(1+e^{-2it})}{1+e^{-2t}}e^{-2t}dt$$
It is easy to show that $I_R\to0$ at $R\to\infty$ (please, see below)
$$=I_R\,+\,2\Re\,J\,-\,\frac{\ln^22}{2}=0\qquad(2)$$
From (1), (2) follows:
$$2\Re\,J=\frac{\ln^22}{2}\,\,\Rightarrow\,\,\boxed{\,\,I=2\Re\,J-\ln^22=-\frac{\ln^22}{2}\,\,}$$
Evaluation of $I_R$:
$$|I_R|=\bigg|\int_0^{\pi/2}\frac{\ln\Big(1+e^{2iRe^{i\phi}}\Big)}{1+e^{2Re^{i\phi}}}iRe^{i\phi}d\phi\bigg|<\int_0^{\pi/2}e^{-2R\cos\phi}\ln\big(1+e^{-2R\sin\phi}\big)Rd\phi$$
Making the change of the variable $\,\phi\to\frac{\pi}{2}-\phi\,$, using $\,\sin \phi>\frac{2}{\pi}\,\phi\,$ for $\,\phi\in[0;\pi/2]$, and introducing some fixed $\,\,a ,\,\,0<a<\frac{\pi}{2}$
$$|I_R|<\int_0^ae^{-\frac{4R}{\pi}\phi}\ln\big(1+e^{-2Ra}\big)Rd\phi+\ln2\int_a^{\pi/2}e^{-\frac{4R}{\pi }}Rd\phi=Ra\ln\big(1+e^{-2Ra}\big)+\frac{\pi \ln2}{4}\Big(e^{-\frac{4Ra}{\pi}}-e^{-2R}\Big)\to0\,\,\text{at}\,\,R\to\infty\quad(3)$$