3. Among the four functions $y=\sin |x|, y=\cos |x|, y=|\cot x|, y=\lg |\sin x|$, the even function that is periodic with $\pi$ and monotonically increasing in $\left(0, \frac{\pi}{2}\right)$ is
A. $y=\sin |x|$
B. $y=\cos |x|$
C. $y=|\cot x|$
D. $y=\lg |\sin x|$
$y=\sin |x|$ is not a periodic function; $y=\cos |x|=\cos x$ has a period of $2 \pi$, and is monotonically decreasing in $(0, \pi)$; $y=|\cot x|$ has a period of $\pi$, and is monotonically decreasing in $\left(0, \frac{\pi}{2}\right)$; $y=\lg |\sin x|$ has a period of $\pi$, and is monotonically increasing in $\left(0, \frac{\pi}{2}\right)$. Therefore, the answer is $D$.