MCPcopy Create free account
hub / github.com/zalando/skipper / Format

Method Format

logging/access.go:95–111  ·  view source on GitHub ↗
(e *logrus.Entry)

Source from the content-addressed store, hash-verified

93}
94
95func (f *accessLogFormatter) Format(e *logrus.Entry) ([]byte, error) {
96 keys := []string{
97 "host", "auth-user", "timestamp", "method", "uri", "proto",
98 "status", "response-size", "referer", "user-agent",
99 "duration", "requested-host", "flow-id", "audit"}
100
101 values := make([]any, len(keys))
102 for i, key := range keys {
103 if s, ok := e.Data[key].(string); ok {
104 values[i] = omitWhitespace(s)
105 } else {
106 values[i] = e.Data[key]
107 }
108 }
109
110 return fmt.Appendf(nil, f.format, values...), nil
111}
112
113func stripQueryString(u string) string {
114 if i := strings.IndexRune(u, '?'); i < 0 {

Callers 1

LogAccessMethod · 0.45

Calls 1

omitWhitespaceFunction · 0.85

Tested by

no test coverage detected