Use logging in generators instead of print stmts.