In this article, we establish foundations for a logarithmic compactification
of general GLSM moduli spaces via the theory of stable log maps. We then
illustrate our method via the key example of Witten's r-spin class. In the
subsequent articles, we will push the technique to the general situation. One
novelty of our theory is that such a compactification admits two virtual
cycles, a usual virtual cycle and a "reduced virtual cycle". A key result of
this article is that the reduced virtual cycle in the r-spin case equals to
the r-spin virtual cycle as defined using cosection localization by
Chang--Li--Li. The reduced virtual cycle has the advantage of being
Cβ-equivariant for a non-trivial Cβ-action. The
localization formula has a variety of applications such as computing higher
genus Gromov--Witten invariants of quintic threefolds and the class of the
locus of holomorphic differentials