I am looking for a positive function $f \in L^1$, which satisfies $\|f\|_{\infty} < \infty$, such that $\log(f) \notin L^1$.
Intuitively, $f$ should very be close to zero so $\log(f)$ should explode.
It seems to me that one could take a piecewise constant $f$ which obtains the value $e^{-n^3}$ on an interval of size $\sim c\frac{1}{n^2}$. (where $c$ is a multiplicative constant to make the sum of the lengths equal $1$).
This would make $\int_0^1|\log(f)|=c\sum_{n=1}^{\infty} n=\infty$.
Am I right?
What about $f : [1, +\infty) \rightarrow \mathbb{R}$ defined for all $x \geq 1$ by $$f(x)=\frac{1}{x^2} \quad \quad ?$$
$f$ is $L^1$ and bounded, but $\ln(f)=-2\ln(x)$ is not $L^1$ at all.
Actually, any $L^1$ bounded decreasing function works. Indeed, if $f$ is $L^1$ and decreasing, then $f$ tends to $0$ in $+\infty$, so $\ln(f)$ tends to $-\infty$ in $+\infty$, so $\ln(f)$ is not $L^1$.