The current logging is not ideal. We should implement logging based on chat events, such as `onFinish`, `onError`, etc.