4. Given that $f(x)$ is a monotonic function on $(0,+\infty)$, and for any $x \in(0,+\infty)$, we have $f\left(f(x)-\log _{2} x\right)=6$. If $x_{0}$ is a solution to the equation $f(x)-f^{\prime}(x)=4$, and $x_{0} \in (a-1, a)\left(a \in \mathbf{Z}_{+}\right)$, then $a=(\quad)$.
(A) 1
(B) 2
(C) 3
(D) 4
4. B.

From the monotonicity of $f(x)$ and $f\left(f(x)-\log _{2} x\right)=6$, we know that $f(x)-\log _{2} x=c$ (constant) $\Rightarrow f(c)=6$.
$$
\begin{array}{l}
\text { Hence } f(c)-\log _{2} c=c \Rightarrow \log _{2} c=6-c \\
\Rightarrow c=4 \Rightarrow f(x)=\log _{2} x+4 . \\
\text { From } f(x)-f^{\prime}(x)=\log _{2} x+4-\frac{1}{x \ln 2}=4 \\
\Rightarrow \log _{2} x_{0}=\frac{1}{x_{0} \ln 2}=\frac{\log _{2} \mathrm{e}}{x_{0}} \\
\Rightarrow x_{0}^{x_{0}}=\mathrm{e} \Rightarrow 1<x_{0}<2 .
\end{array}
$$