use mongodb group() for log aggregation