MCPcopy
hub / github.com/uber-go/zap / Logf

Method Logf

zaptest/logger_test.go:166–177  ·  view source on GitHub ↗
(format string, args ...interface{})

Source from the content-addressed store, hash-verified

164}
165
166func (t *testLogSpy) Logf(format string, args ...interface{}) {
167 // Log messages are in the format,
168 //
169 // 2017-10-27T13:03:01.000-0700 DEBUG your message here {data here}
170 //
171 // We strip the first part of these messages because we can't really test
172 // for the timestamp from these tests.
173 m := fmt.Sprintf(format, args...)
174 m = m[strings.IndexByte(m, '\t')+1:]
175 t.Messages = append(t.Messages, m)
176 t.TB.Log(m)
177}
178
179func (t *testLogSpy) AssertMessages(msgs ...string) {
180 assert.Equal(t.TB, msgs, t.Messages, "logged messages did not match")

Callers

nothing calls this directly

Calls 1

LogMethod · 0.45

Tested by

no test coverage detected