As shown here:
If $X\sim U(0,1)$, then $(Y=-\ln X) \sim Exp(1)$
However, the answer below this has the PDF as: \begin{cases} \dfrac{1}{(b - a) \cdot x}, & a \leq -\ln(x) \leq b \\ 0, & \text{else} \end{cases}
which does not match the earlier answer.
I know the first answer is the answer I have seen elsewhere. Can anyone explain what the second answer is saying and reconcile with the first one?
The comments after the second answer discuss
$$X \sim U(0,1) \text{ versus} X \sim U(a,b)$$
but even if I substitute $a=0, b=1$ in the second answer, I cannot reduce to a $Y=\text{Exp}(1)$ random variable PDF.
From what I can see the second answer is wrong, because it does not result in a $Exp(1)$. In fact, it uses the PDF method to derive the PDF of $Y=-\ln X$, and uses $Y=-\ln X$ rather than the inverse, which is the usual case in the formula.