change prompt API to expose log method