Let us prove the result.
Let $(X,\Sigma, \mu)$ be a measure space.
$(1 \Rightarrow 2)$. Suppose for every $f\geq 0$,$\int_{X}fd\mu<\infty\iff\int_{X}e^{f}d\mu<\infty$.
Take $f=0$. Clearly, $\int_{X}fd\mu=0<\infty$. So
$$ \mu(X)= \int_X 1 d\mu= \int_X e^0 d\mu= \int_X e^f d\mu < \infty$$
Now, let us prove that $X$ is not the union of infinitely many sets of positive measure.
Suppose that $X$ is the union of infinitely many sets of positive measure. Since $\mu(X)<+\infty$, it follow that for all $\delta >0$ there is $E \in \Sigma$ such that $\mu(E)<\delta$. It follows, from lemma $1$ and lemma $2$ in the Remark 1, that $L^2(X) \subsetneq L^1(X)$. Take a function $f \in L^1(X)$ such that $f \notin L^2(X)$. But then we have that $|f|\geq 0$, $\int_{X}|f|d\mu<\infty$ and
$$ \int_X e^{|f|} d\mu > \int_X \left (1+|f| + \frac{1}{2}|f|^2 \right) d\mu \geqslant \frac{1}{2} \int_X |f|^2 d\mu =+\infty $$
Contradiction to $(1)$.
So $X$ is not the union of infinitely many sets of positive measure.
$(2 \Rightarrow 1)$ In fact, $(2)$ entails a stronger result than $(1)$. Let us assume $(2)$. Given any $f \geq 0$ and given any $n \in \mathbb{N}$ let
$$ A_n=\{x \in X: n \leq f(x) < n+1 \}$$
Clearly $\{A_n\}_n$ is an infinite family of disjoint sets and $X=\bigcup_nA_n$. Since $X$ is not the union of infinitely many sets with positive measure, it is easy to prove that there is $n_0 \in \mathbb{N}$ such that if $n \geq n_0$, $\mu(A_n)=0$. So $f<n_0$ $a.e.$. So $e^f<e^{n_0}$ $a.e.$. So we have $\int_X f d\mu < n_0\mu(X)<\infty$ and $\int_X e^f d\mu < e^{n_0}\mu(X)<\infty$. Then $(1)$ follows immediately.
Remark 1:
Lemma 1. Let $(X,\Sigma, \mu)$ be a measure space. If $\mu(X)<+\infty$ is finite then $L^2(X) \subseteq L^1(X)$.
Proof Since $\mu(X)<+\infty$, we have $\chi_X \in L^2(X)$. Then for any $f\in L^2(X)$, applying Hölder inequality, we have
$$ \|f\|_1= \|f\, \chi_X \|_1\leqslant \|\chi_X\|_2 \|f\|_2 =(\mu(X))^{1/2} \|f\|_2 $$
Lemma 2. Let $(X,\Sigma, \mu)$ be a measure space. If $L^1(X) \subseteq L^2(X)$, then there is $\delta >0$ such that, for any $E\in \Sigma$, if $\mu(E)>0$ then $ \mu(E) > \delta $.
Proof: Let $T: L^1(X) \rightarrow L^2(X)$ be the inclusion map, that is $T(f)=f$. $T$ is obvious linear. Using the Closed Graph Theorem, we can prove $T$ is continuous (bounded).
In fact, let $\{f_n\}$ be a sequence in $L^1(X)$ which converges to $f$ in the $L^1$ norm, and to $g$ for the $L^2$ norm. We extract a subsequence $\{f_{n_j}\}$ which converges to $f$ $a.e.$; this subsequence still converges to $g$ for the $L^2$ norm; now extract from this subsequence a new subsequence which converges to $g$ almost $a.e.$.
So we have a subsequence which converges $a.e.$ to $f$ and $g$, hence $f=g$, and, since both $L^1(X)$ and $L^2(X)$ are Banach spaces, by the Closed Graph Theorem we conclude that $T$ is continuous (bounded).
Since $T \neq 0$, we have that $0<\|T\| <+\infty$.
Now, let us prove that, given any $E \in \Sigma$ such that $\mu(E)>0$,
$ \mu(E) \geqslant \frac{1}{\|T\|}$.
If $\mu(E)=+\infty$, then it trivial that $\mu(E) \geqslant \frac{1}{\|T\|}$.
Suppose $0<\mu(E)<+\infty $,
let
$$f_E= \frac{1}{\mu(E)} \chi_E$$
It follows immediately that $\|f_E\|_1=1$ and $\|f_E\|_2=\frac{1}{\mu(E)}$.
So
$$ \frac{1}{\mu(E)}=\|f_E\|_2 =\|T(f_E)\|_2 \leqslant \|T\| \|f_E\|_1 =\|T\| $$
So
$$ \mu(E) \geqslant \frac{1}{\|T\|} $$
Taking $\delta = \frac{1}{2\|T\|}$, we have $ \mu(E) > \delta $.
Remark 2: In fact, we proved a slightly more general result. We proved that
he following statements are equivalent:
- for every $f\geq 0$,$\int_{X}fd\mu<\infty\iff\int_{X}e^{f}d\mu<\infty$
- $\mu$ is finite measure and X is not the union of infinitely many sets of positive measure.
- for every $f\geq 0$,$\int_{X}fd\mu<\infty$ and $\int_{X}e^{f}d\mu<\infty$