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

Function TestCustomOutputForApplicationLog

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

Source from the content-addressed store, hash-verified

13)
14
15func TestCustomOutputForApplicationLog(t *testing.T) {
16 var buf bytes.Buffer
17 _ = NewAccessLogger(Options{ApplicationLogOutput: &buf})
18 msg := "Hello, world!"
19 log.Info(msg)
20 if !strings.Contains(buf.String(), msg) {
21 t.Error("failed to use custom output")
22 }
23}
24
25func TestCustomPrefixForApplicationLog(t *testing.T) {
26 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

NewAccessLoggerFunction · 0.85
InfoMethod · 0.65
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…