4. Let $x \geqslant 0, y \geqslant 0$, and $x+2 y=\frac{1}{2}$, then the maximum value of the function $u=\log \frac{1}{2}\left(8 x y+4 y^{2}+1\right)$ is
A. $\log \frac{1}{2} \frac{4}{3}$
B. 0
C. 1
D. $\log _{\frac{1}{2}} \frac{3}{4}$