The problem of compactifying the moduli spaceA of principally polarized g abelian varieties has a long and rich history. The majority of recent work has focusedonthe toroidal compacti?cations constructed over C by Mumford and his coworkers, and over Z by Chai and Faltings. The main drawback of these compacti?cations is that they are not canonical and do not represent any r- sonable moduli problem on the category of schemes. The starting point for this work is the realization of Alexeev and Nakamura that there is a canonical compacti?cation of the moduli space of principally polarized abelian varieties. Indeed Alexeev describes a moduli problem representable by a proper al- braic stack over Z which containsA as a dense open subset of one of its g irreducible components. In this text we explain how, using logarithmic structures in the sense of Fontaine, Illusie, and Kato, one can de?ne a moduli problem "carving out" the main component in Alexeev's space. We also explain how to generalize the theory to higher degree polarizations and discuss various applications to moduli spaces for abelian varieties with level structure.