Fixed bug in apiv2 logging