pub fn tracing_callback() -> MessageCallbackExpand description
Create a MessageCallback that emits structured tracing events for
every message variant.
| Variant | Level | Fields |
|---|---|---|
System | INFO | session_id |
Assistant | DEBUG | (message variant only) |
User | DEBUG | (message variant only) |
Result | INFO | stop_reason, is_error |
StreamEvent | TRACE | event_type |
ยงExample
use gemini_cli_sdk::callback::tracing_callback;
let cb = tracing_callback();
// Pass `cb` to `ClientConfig::builder().on_message(cb).build()`.