Merge pull request #3121 from chengzhichao-xydt/codex/openai-stream-logger

refactor(openai_compat): replace log.Printf with structured logger
This commit is contained in:
Mauro 2026-06-14 21:18:40 +02:00 committed by GitHub
commit 73738f1cd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,6 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io" "io"
"log"
"maps" "maps"
"net/http" "net/http"
"net/url" "net/url"
@ -769,7 +768,10 @@ func parseStreamResponse(
raw := acc.argsJSON.String() raw := acc.argsJSON.String()
if raw != "" { if raw != "" {
if err := json.Unmarshal([]byte(raw), &args); err != nil { if err := json.Unmarshal([]byte(raw), &args); err != nil {
log.Printf("openai_compat stream: failed to decode tool call arguments for %q: %v", acc.name, err) logger.WarnCF("openai_compat", "stream: failed to decode tool call arguments", map[string]any{
"tool": acc.name,
"error": err.Error(),
})
args["raw"] = raw args["raw"] = raw
} }
} }