  We investigate the problem of deriving adaptive posterior rates of
contraction on $\mathbb{L}^{\infty}$ balls in density estimation. Although it
is known that log-density priors can achieve optimal rates when the true
density is sufficiently smooth, adaptive rates were still to be proven. Here we
establish that the so-called spike-and-slab prior can achieve adaptive and
optimal posterior contraction rates. Along the way, we prove a generic
$\mathbb{L}^{\infty}$ contraction result for log-density priors with
independent wavelet coefficients. Interestingly, our approach is different from
previous works on $\mathbb{L}^{\infty}$ contraction and is reminiscent of the
classical test-based approach used in Bayesian nonparametrics. Moreover, we
require no lower bound on the smoothness of the true density, albeit the rates
are deteriorated by an extra $\log(n)$ factor in the case of low smoothness.
