added cl in api to test IP logging
added better logging