Taking the limit "out of" $ln$ function. Why is it possible? Consider  
$$\ln \mathop {\lim }\limits_{x \to 0} f(x) = \mathop {\lim }\limits_{x \to 0} \ln f(x)$$
Why is this equality true?
I know that it has something to do with the fact that $ln$ is continuous on $\mathbb{R}$.
 A: It's a theorem that if a function $f$ is continuous at $L$, and $\lim_{x \to a}g(x) = L$ then  $$\lim_{x \to a}f(g(x)) = f(\lim_{x \to a}g(x)) = f(L).$$
You can prove this by considering the function $G(x)$ defined to be $g(x)$ for $x \neq a$ and $L$ for $x = a$. Then, $G$ is continuous at $a$, and since a composition of continuous functions is continuous, $f \circ G$ is continuous at $a$. It follows that $$\lim_{x \to a}f(g(x)) = \lim_{x \to a}f(G(x)) = f(G(a)) = f(L).$$
If $\lim_{x \to a}f(x) = L > 0$ then it follows from this thoerem that $$\lim_{x \to a}\ln(f(x))=\ln(L).$$
This all depends on the fact that $\ln$ is continuous on $(0, \infty)$. Note that $\ln$ is not continuous on $\mathbb{R}$, as you said it was in your post; it is crucial that $L > 0$ for this theorem to hold.
A: this you can do when $f$ is continuous in $0$ and $f\left(0\right)>0$ because $ln:\left(0,\infty\right)\rightarrow \mathbb{R}$ is continuous.
In case we are not talking about a real limit, but divergence towards infinity it is also possible when $f\left(0\right)=0$, $f$ is not locally constant $0$ around $0$, $f$ is continuous in $0$ and monotonically increasing around $0$.
this makes sure that if $x_{n}\rightarrow 0 \Rightarrow 0<f\left(x_{n}\right)\rightarrow f\left(0\right)=0$ and therefore $f\left(x_{n}\right)$ is monotonically decreasing. this implies $ln\left(f\left(x_{n}\right)\right)$ is monotonically decreasing and because $ln$ is not bounded around zero the whole stuff tends to minus infinity.
