  We prove a global residual formula in terms of logarithmic indices for
one-dimensional holomorphic foliations, with isolated singularities, and
logarithmic along normal crossing divisors. We also give a formula for the
total sum of the logarithmic indices if the singular set of the foliation is
contained in the invariant divisor. As an application, we provide a formula for
the number of singularities in the complement of the invariant divisor on
complex projective spaces. Finally, we obtain a Poincar\'e-Hopf type formula
for singular normal projective varieties.
