Added ip logging to apiv1
Fixed bug in apiv2 logging