How does the chain rule for limits work? I have to evaluate the limit of this function, 
$$\lim_{x\to0^+} \arctan(\ln x)$$
I already know the answer, it's $-\dfrac{π}{2}$, but the only part I don't get it, how does it come to that? I did the following steps:
$$\lim_{x\to0^+} \arctan(\ln x)
= \arctan\left(\lim_{x\to0^+} \ln x\right)$$
The limit of $\ln(x)$ when $x$ approaces $0^+$ is negative infinity, wouldn't that mean the answer we're looking for is arctan of negative infinity, which is something we can't find?
Still, it goes to:
$$\lim_{x\to -\infty} \arctan (x) = -\dfrac{\pi}{2}$$, which is how the answer seem to work? How does this happen? And, how does the chain rule come in all this? 
Thank you in advance for your answer.

Look at the expression
$$\lim_{x \to 0^+} \arctan(\ln x)$$
Let $u = \ln x$. Then $u \to -\infty$ as $x \to 0^+$. So we can substitute $u$ for $\ln x$ and $u \to -\infty$ for $x \to 0^+$ to obtain
$$\lim_{x \to 0^+} \arctan(\ln x) = \lim_{u \to -\infty} \arctan(u)$$
This evaluates to $-\dfrac{\pi}{2}$.
All we did was substitute a new variable; nothing too in-depth!
