adding api logging