I have the following problem. Let $r_0>0$.
Does there exist a family of smooth real-valued functions $\phi_{r_0}:[0,1] \to \mathbb{R}^+$ (parametrized by $r_0$), satisfying
$$ \phi_{r_0}(r) = \begin{cases} \log {r} & \text{if $r \ge r_0$} \\ ? & \text{if } r^*\le r<r_0 \\ \text{const} & \text{if } 0<r\le r^*, \end{cases} $$
where $r^*$ is a parameter which depends (in any way you want to) on $r_0$, such that
$$ \lim_{r_0 \to 0}\int_{0}^{r_0} \big(\phi_{r_0}'(r)\cdot r\big)^2 d r =0$$
The constant value $\phi_{r_0}(r)$ takes at $r \le r^*$ may also depend on $r_0$.
The $\phi_{r_0}$ do not need to change continuously with $r_0$. (In fact I will be satisfied with constructing a sequence $\phi_{r(n)}$ which corresponds to $r_0=r(n)$ which tends to zero when $n \to \infty$).
Let $\psi$ a $C^\infty$ function whole value is $0$ for $x<0$ and $1$ for $x\ \ge 1$. Such function can be constructed using the standard $C^\infty$ function :
$$f(x) = \begin{cases} e^{-\frac 1 x } & \text{ if } x>0 \\ 0 & \text{ otherwise} \end{cases}$$
And by defining $\psi(x) = \frac{f(x)}{f(x)+f(1-x)}$.
Thus the following does what is required, with $C$ some constant :
$$\phi_{r_0}(r) = C\psi\left( \frac {r}{r^*-r_0} - \frac{r_0}{r^*-r_0} \right) + \log r \psi\left( \frac {r}{r_0-r^*} - \frac{r^*}{r_0-r^*} \right).$$
Indeed we only have $C^\infty$ functions involved and I let you verify that the equality on each interval and the condition over the integral are verified for $r^* = r_0/2$ for example.