I am looking for a measurable function $f\colon (0;1) \to [0;\infty)$ with $$ \int_0^1 f(x) \mathrm dx < \infty, \quad \int_0^1 f(x)^{1+\alpha} \mathrm dx = \infty \quad \text{for all}\, \alpha > 0. $$ Taking $f(x) = x^{-1}$ does not work because the first statement is violated.
Taking $f(x) = x^{-1+\beta}$ for $\beta > 0$ small does not work because the second statement is violated for small $\alpha$.
Taking $f(x) = x^{-1+x}$ does not work because the first statement is violated (according to Wolfram Alpha).
Or can we prove that such a function does not exist? It seems like $p \mapsto \Vert f\Vert_p$ is continuous in the sense that the pre-image of $\{\infty\}$ is closed.