improve out_mongodb and add log support