Logging stats now sends a collection param so that we can use same function for logging to different collections.