MongoDB log fixed to handle Mongo objects correctly