logEntryWithRequestID returns a logrus entry with request_id field if available in context.
(ctx context.Context)
| 5660 | |
| 5661 | // logEntryWithRequestID returns a logrus entry with request_id field if available in context. |
| 5662 | func 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 | |
| 5672 | func debugLogAuthSelection(entry *log.Entry, auth *Auth, provider string, model string) { |
| 5673 | if !log.IsLevelEnabled(log.DebugLevel) { |
no test coverage detected