I know this is an old question with an accepted answer, but I was surprised to see no one coming up with the following solution by differentiation under the integral sign, (which is the most straightforward method for this integral IMHO) and so I thought it would be helpful to add this here:
$$I(a):=\int_0^\pi\frac{\ln(1+a\cos{\theta})}{\cos{\theta}}\,d\theta, a\in[0,1]$$
$$\frac{dI}{da}=\frac d{da}\int_0^\pi\frac{\ln(1+a\cos{\theta})}{\cos{\theta}}\,d\theta$$
$$=\int_0^\pi\frac1{\cos\theta}\frac\partial{\partial a}{\ln(1+a\cos{\theta})}d\theta$$
$$=\int_0^\pi\frac1{\cos\theta}{\frac{\cos\theta}{1+a\cos{\theta}}}d\theta$$
$$=\int_0^\pi\frac1{1+a\cos{\theta}}d\theta$$
$$=\frac\pi{\sqrt{1-a^2}}$$
$$\because I(0)=\int_0^\pi\frac{\ln(1)}{\cos\theta}\,d\theta=0,$$
$$\therefore I(a)=I(0)+\int_0^a\frac{dI}{da}da=\int_0^a\frac\pi{\sqrt{1-a^2}}dx=\pi\arcsin a$$
$$\boxed{\int_0^\pi\frac{\ln(1+\cos\theta)}{\cos\theta}\,d\theta=I(1)=\pi\arcsin 1=\frac{\pi^2}2}$$
So by differentiating under the integral sign, one is left only with the integral $\int_0^\pi\frac{d\theta}{1+a\cos{\theta}}$, which is much simpler to evaluate. Below is one solution by complex analysis. For anyone uncomfortable with complex analysis, the substitution $t=\tan\frac\theta2$ (and other symmetry/trigonometry tricks) will work as well.
$$J=\int_0^\pi\frac{d\theta}{1+a\cos\theta}$$
Substituting $\theta\rightarrow2\pi-\theta, d\theta\rightarrow-d\theta$,
$$J=-\int_{2\pi}^\pi\frac1{1+a\cos(2\pi-\theta)}d\theta=\int_\pi^{2\pi}\frac1{1+a\cos\theta}d\theta$$
$$\therefore 2J=\int_0^{2\pi}\frac1{1+a\cos\theta}d\theta\implies J=\frac1 2\int_0^{2\pi}\frac1{1+a\cos\theta}d\theta$$
$$J=\frac1 2\int_0^{2\pi}\frac1{1+a(\frac{e^{i\theta}+e^{-i\theta}}2)}d\theta=\int_0^{2\pi}\frac1{2+ae^{i\theta}+ae^{-i\theta}}d\theta$$
Substitute $z=e^{i\theta},dz=ie^{i\theta}d\theta\implies d\theta=\frac{dz}{iz}$
$$J=\oint_C \frac1{2+az+a/z}\frac{dz}{iz}=\frac1{ia}\oint_C\frac{dz}{z^2+(2/a)z+1}$$
where $C$ is the counterclockwise contour over the unit circle. By the residue theorem,
$$J=\frac1{ia}2\pi i\sum Res\frac1{z^2+(2/a)z+1}$$
$\frac{-1+\sqrt{1-a^2}}a$ is the only root of $z^2+(2/a)z+1$ within the unit circle, and its residue is $\frac a{2\sqrt{1-a^2}}$
$$\boxed{\therefore J=\int_0^\pi\frac{d\theta}{1+a\cos\theta}=\frac1{ia}\cdot2\pi i\cdot \frac a{2\sqrt{1-a^2}}=\frac\pi{\sqrt{1-a^2}}}$$