(I didn't have time to consider the case $\int_X\log|f|=-\infty$, so I post what I have)
Assume first that $\int_X\log|f|\,d\mu$ is finite.
Using that $\mu(X)=1$, that $p$ can be assumed small, and Taylor approximations around $0$ for $\log(1+t)$, $e^t$ (i.e. $\log(1+t)\simeq t$, $e^t\simeq1+t$), $ e^{\int_X\log|f|\,d\mu}=\lim_{p\to0}e^{\frac1p\int_Xp\log|f|}=\lim_{p\to0}e^{\frac1p\log\left(1+\int_Xp\log|f|\right)}=\lim_{p\to0}\left(1+\int_Xp\log|f|\right)^{1/p} =\lim_{p\to0}\left(\int_X1+p\log|f|\right)^{1/p} =\lim_{p\to0}\left(\int_Xe^{p\log|f|}\right)^{1/p}\\ =\lim_{p\to0}\left(\int_X{|f|^p}\,\right)^{1/p} =\lim_{p\to0}\|f\|_p. $
In the case where $\int_X\log|f|\,d\mu=\infty$, then $\|f\|_p=\infty$ for all $p$ and so the equality holds. Indeed, if $\|f\|_p<\infty$ for some $p$, using that there exists $k>0$ such that $\log t\leq t^p$ if $t>k$, we get $ \int_X\log|f|=\int_{|f|\leq k}\log|f|+\int_{|f|>k}\log|f|\leq\log k + \int_{|f|>k}|f|^p\leq\log k +\|f\|_p<\infty. $