refactor(proxy): migrate to zerolog structured logging
This commit is contained in:
@@ -3,13 +3,14 @@ package proxy
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
// SniffedProfile holds everything captured from a real Claude Code request.
|
||||
@@ -116,8 +117,11 @@ func SniffClaudeCode(claudeBinary string) (*SniffedProfile, error) {
|
||||
return nil, fmt.Errorf("no API request captured")
|
||||
}
|
||||
|
||||
log.Printf("sniffed claude-code: version=%s headers=%d body=%d bytes",
|
||||
profile.Version, len(profile.Headers), len(profile.Body))
|
||||
log.Info().
|
||||
Str("version", profile.Version).
|
||||
Int("headers", len(profile.Headers)).
|
||||
Int("body_size", len(profile.Body)).
|
||||
Msg("sniffed claude-code profile")
|
||||
return profile, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user