  Let $\Gamma$ be a countable abelian semigroup and $A$ be a countable abelian
group satisfying a certain finiteness condition. Suppose that a group $G$ acts
on a $(\Gamma \times A)$-graded Lie superalgebra ${\frak
L}=\bigoplus_{(\alpha,a) \in \Gamma\times A} {\frak L}_{(\alpha,a)}$ by Lie
superalgebra automorphisms preserving the $(\Gamma\times A)$-gradation. In this
paper, we show that the Euler-Poincar\'e principle yields the generalized
denominator identity for ${\frak L}$ and derive a closed form formula for the
supertraces $\text{str}(g|{\frak L}_{(\alpha,a)})$ for all $g\in G$,$(\alpha,a)
\in \Gamma\times A$. We discuss the applications of our supertrace formula to
various classes of infinite dimensional Lie superalgebras such as free Lie
superalgebras and generalized Kac-Moody superalgebras. In particular, we
determine the decomposition of free Lie superalgebras into a direct sum of
irreducible $GL(n) \times GL(k)$-modules, and the supertraces of the Monstrous
Lie superalgebras with group actions. Finally, we prove that the generalized
characters of Verma modules and the irreducible highest weight modules over a
generalized Kac-Moody superalgebra ${\frak g}$ corresponding to the Dynkin
diagram automorphism $\sigma$ are the same as the usual characters of Verma
modules and irreducible highest weight modules over the orbit Lie superalgebra
$\breve{\frak g}={\frak g}(\sigma)$ determined by $\sigma$.
