This question is motivated by an exercise in Folland's Real Analysis:
One can prove (a) by Jensen's inequality as long as $\log|f|^q\in L^1$ and separately deal with the case when $\log|f|^q\not\in L^1$.
Here is my question:
Could anyone come up with an example of $f$ satisfying the assumption in the exercise but $\log|f|^q\not\in L^1$?

Let $X=[0,1]$ with Lebesgue measure and $f(x)=e^{-1/x}$.