ip logging function added as comment