A walkthrough of how to enable request and response logging in Spring AI applications using the built-in SimpleLoggerAdvisor. The tutorial covers creating a basic chat controller with ChatClient, inspecting the ChatResponse object for metadata like token usage and model info, and then wiring in the SimpleLoggerAdvisor bean to capture raw LLM request and response payloads at the debug log level — without needing to hook into the underlying HTTP client directly.

9m watch time

Sort: