(2) Among the four functions $y=\sin |x|, y=\cos |x|, y=|\tan x|, y=$ $-\ln |\sin x|$, the one that has a period of $\pi$, is monotonically decreasing in $\left(0, \frac{\pi}{2}\right)$, and is an even function is ( ).
(A) $y=\sin |x|$
(B) $y=\cos |x|$
(C) $y=|\tan x|$
(D) $y=-\ln |\sin x|$
(2) D Hint: Since $y=\sin |x|$ is not a periodic function, A is incorrect; since $y=$ $\cos |x|$ is a periodic function with the smallest positive period of $2 \pi$, B is incorrect; since $y=|\tan x|$ is monotonically increasing in $\left(0, \frac{\pi}{2}\right)$, C is incorrect; the function $y=-\ln |\sin x|$ meets the requirements of the problem.