MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / logEntryWithRequestID

Function logEntryWithRequestID

sdk/cliproxy/auth/conductor.go:5662–5670  ·  view source on GitHub ↗

logEntryWithRequestID returns a logrus entry with request_id field if available in context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

5660
5661// logEntryWithRequestID returns a logrus entry with request_id field if available in context.
5662func logEntryWithRequestID(ctx context.Context) *log.Entry {
5663 if ctx == nil {
5664 return log.NewEntry(log.StandardLogger())
5665 }
5666 if reqID := logging.GetRequestID(ctx); reqID != "" {
5667 return log.WithField("request_id", reqID)
5668 }
5669 return log.NewEntry(log.StandardLogger())
5670}
5671
5672func debugLogAuthSelection(entry *log.Entry, auth *Auth, provider string, model string) {
5673 if !log.IsLevelEnabled(log.DebugLevel) {

Callers 5

persistCooldownStatesMethod · 0.85
executeMixedOnceMethod · 0.85
executeCountMixedOnceMethod · 0.85

Calls 1

GetRequestIDFunction · 0.92

Tested by

no test coverage detected