proper logging api for embedding