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

Function TestCustomOutputForAccessLog

logging/log_test.go:38–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestCustomOutputForAccessLog(t *testing.T) {
39 var buf bytes.Buffer
40 lg := NewAccessLogger(Options{AccessLogOutput: &buf})
41 lg.LogAccess(&AccessEntry{StatusCode: http.StatusTeapot}, nil)
42 if !strings.Contains(buf.String(), strconv.Itoa(http.StatusTeapot)) {
43 t.Error("failed to use custom access log output")
44 }
45}
46
47func TestApplicationLogJSONEnabled(t *testing.T) {
48 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

LogAccessMethod · 0.95
NewAccessLoggerFunction · 0.85
StringMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…