Add collection logging to sgen.