For a degenerating family of projective manifolds, it is of fundamental interest to study the asymptotic behavior of integrals near singular fibers. In our main results, we determine the volume asymptotics (equivalently the asymptotics of L 2 metrics) in all base dimensions, which generalizes numerous previous results in base dimension 1.In the case of log Calabi-Yau fibrations, we establish a metric version of the canonical bundle formula (due to Kawamata and others): the L 2 metric carries the singularity equal to the discriminant divisor and the moduli part line bundle has a singular hermitian metric with vanishing Lelong numbers. This solves a problem which is implicit in Kawamata's work and recently raised again by Eriksson, Freixas i Montplet and Mourougane.As consequences, we strengthen the semipositivity theorems due to Fujita, Kawamata and others for log Calabi-Yau fibrations, giving an entirely new simpler proof which does not use Hodge theory, i.e. difficult results (e.g. Cattani-Kaplan-Schmid) in the theory of variation of Hodge structure. Instead, in the proof of our main results, together with the study of plurisubharmonic singularities, we use Berndtsson type results on the positivity of direct images. The fact that this much simpler and direct method can replace the use of Hodge theory in the proof of the semipositivity theorems answers a question of Berndtsson.