Skip to content

Commit 7078a0b

Browse files
authored
Log compaction request bodies (#8676)
We already log request bodies for normal requests, logging for compaction helps with debugging.
1 parent 79ce79a commit 7078a0b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

codex-rs/codex-client/src/transport.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ impl ReqwestTransport {
6969
#[async_trait]
7070
impl HttpTransport for ReqwestTransport {
7171
async fn execute(&self, req: Request) -> Result<Response, TransportError> {
72+
if enabled!(Level::TRACE) {
73+
trace!(
74+
"{} to {}: {}",
75+
req.method,
76+
req.url,
77+
req.body.as_ref().unwrap_or_default()
78+
);
79+
}
80+
7281
let builder = self.build(req)?;
7382
let resp = builder.send().await.map_err(Self::map_error)?;
7483
let status = resp.status();

codex-rs/protocol/src/models.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ impl Serialize for FunctionCallOutputPayload {
416416
where
417417
S: Serializer,
418418
{
419-
tracing::debug!("Function call output payload: {:?}", self);
420419
if let Some(items) = &self.content_items {
421420
items.serialize(serializer)
422421
} else {

0 commit comments

Comments
 (0)