Using Fourier Series
As shown in this answer,
$$
\log(1+\cos(x))=2\sum_{k=1}^\infty(-1)^{k-1}\frac{\cos(kx)}{k}-\log(2)\tag{1}
$$
For all $k\in\mathbb{Z}\setminus\{0\}$
$$
\int_0^\pi\cos(kx)\,\mathrm{d}x=0\tag{2}
$$
Therefore,
$$
\int_0^\pi\log(1+\cos(x))\,\mathrm{d}x=-\pi\log(2)\tag{3}
$$
A More Elementary Approach
$$
\begin{align}
\int_0^\pi\log(1+\cos(x))\,\mathrm{d}x
&=\int_0^\pi\log\left(2\cos^2\left(\frac x2\right)\right)\,\mathrm{d}x\\
&=\pi\log(2)+\int_0^\pi\log\left(\cos^2\left(\frac x2\right)\right)\,\mathrm{d}x\\
&=\pi\log(2)+2\int_0^{\pi/2}\log\left(\cos^2(x)\right)\,\mathrm{d}x\tag{4}
\end{align}
$$
and
$$
\begin{align}
\int_0^\pi\log(1-\cos(x))\,\mathrm{d}x
&=\int_0^\pi\log\left(2\sin^2\left(\frac x2\right)\right)\,\mathrm{d}x\\
&=\pi\log(2)+\int_0^\pi\log\left(\sin^2\left(\frac x2\right)\right)\,\mathrm{d}x\\
&=\pi\log(2)+2\int_0^{\pi/2}\log\left(\sin^2(x)\right)\,\mathrm{d}x\tag{5}
\end{align}
$$
By substituting $x\mapsto\pi-x$, we see that the left side of $(4)$ equals the left side of $(5)$. Therefore,
$$
\begin{align}
2\int_0^\pi\log(1+\cos(x))\,\mathrm{d}x
&=\int_0^\pi\log(1+\cos(x))\,\mathrm{d}x+\int_0^\pi\log(1-\cos(x))\,\mathrm{d}x\tag{6}\\
&=\int_0^\pi\log\left(\sin^2(x)\right)\,\mathrm{d}x\tag{7}\\
&=2\int_0^\pi\log(1-\cos(x))\,\mathrm{d}x\tag{8}\\
&=2\pi\log(2)+4\int_0^{\pi/2}\log\left(\sin^2(x)\right)\,\mathrm{d}x\tag{9}\\
&=2\pi\log(2)+2\int_0^\pi\log\left(\sin^2(x)\right)\,\mathrm{d}x\tag{10}\\
&=-2\pi\log(2)\tag{11}
\end{align}
$$
Explanation:
$\phantom{1}(6)$: the left side of $(4)$ equals the left side of $(5)$
$\phantom{1}(7)$: add the integrands
$\phantom{1}(8)$: twice the left side of $(4)$ equals twice the left side of $(5)$
$\phantom{1}(9)$: apply $(5)$
$(10)$: $\sin(x)=\sin(\pi-x)$
$(11)$: $2$ times $(7)$ minus $(10)$
Thus, dividing $(11)$ by $2$, we get
$$
\int_0^\pi\log(1+\cos(x))\,\mathrm{d}x=-\pi\log(2)\tag{12}
$$