Set $I = \displaystyle \int_0^{\pi/2}\log(\cos(x))dx$. Then
\begin{align}
I &= \displaystyle \frac{I+I}{2}\\ \\
&=\frac12\int_0^{\pi/2}\log\big(\sin(x))+\log(\cos(x)\big)dx \\ \\
&=\frac12\int_0^{\pi/2}\log\big(\sin(x)\cos(x)\big)dx\\ \\
&=\frac12\int_0^{\pi/2}\log\left(\frac12\sin(2x)\right)dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac12\int_0^{\pi /2}\log(\sin(2x))dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac I4 + \frac14\int_0^{\pi/2}\log(\cos(x))dx\\ \\
&=\frac\pi4 \log\left(\frac12\right) + \frac I4 + \frac I4\\ \\
&= \frac\pi4 \log\left(\frac12\right) + \frac I2.
\end{align}
Hence $I = \displaystyle \frac\pi 2 \log\left(\frac12\right).$
Edit: perhaps my choice to attack the problem as I did is unclear. Here's maybe a little intuition for why the integrals for $\log\circ \sin$ and $\log \circ \cos$ should be equal on this interval. Look at the Riemann sums. Take a rectangle on the left half, while looking at $\log \circ \cos$. It will correspond exactly to a rectangle on the right half of the interval for $\log \circ \sin$ by the symmetry of $\sin$ and $\cos$ about $\displaystyle \frac\pi4$.
Here is a full calculation, with all the gory details.
Set $u= x-\displaystyle\frac\pi2$, so $\cos(x) = -\sin(u)$. Then we have
$$\int_0^{\pi/2}\log(\cos(x))dx = \int_{-\pi /2}^0 \log(-\sin(u))du = \int_{-\pi/2}^0 \log(\sin(-u))du $$
$$= \int_{\pi/2}^0 \log(\sin(u))(-du) = \int_0^{\pi/2}\log(\sin(u))du$$
as desired.