Added logging to a MongoDB collection.