  This paper concerns a variational representation formula for Wiener
functionals. Let $B=\{ B_{t}\} _{t\ge 0}$ be a standard $d$-dimensional
Brownian motion. Bou\'e and Dupuis (1998) showed that, for any bounded
measurable functional $F(B)$ of $B$ up to time $1$, the expectation
$\mathbb{E}\!\left[ e^{F(B)}\right] $ admits a variational representation in
terms of drifted Brownian motions. In this paper, with a slight modification of
insightful reasoning by Lehec (2013) allowing also $F(B)$ to be a functional of
$B$ over the whole time interval, we prove that the Bou\'e--Dupuis formula
holds true provided that both $e^{F(B)}$ and $F(B)$ are integrable, relaxing
conditions in earlier works. We also show that the formula implies the
exponential hypercontractivity of the Ornstein--Uhlenbeck semigroup in
$\mathbb{R}^{d}$, and hence, due to their equivalence, implies the logarithmic
Sobolev inequality in the $d$-dimensional Gaussian space.
