Added api logging