add log for api