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

Function selectorLogEntry

sdk/cliproxy/auth/selector.go:472–480  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

470}
471
472func selectorLogEntry(ctx context.Context) *log.Entry {
473 if ctx == nil {
474 return log.NewEntry(log.StandardLogger())
475 }
476 if reqID := logging.GetRequestID(ctx); reqID != "" {
477 return log.WithField("request_id", reqID)
478 }
479 return log.NewEntry(log.StandardLogger())
480}
481
482// truncateSessionID shortens session ID for logging (first 8 chars + "...")
483func truncateSessionID(id string) string {

Callers 1

PickMethod · 0.85

Calls 1

GetRequestIDFunction · 0.92

Tested by

no test coverage detected