MCPcopy
hub / github.com/sirupsen/logrus / TestUserSuppliedMsgFieldHasPrefix

Function TestUserSuppliedMsgFieldHasPrefix

logrus_test.go:231–238  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) {
232 LogAndAssertJSON(t, func(log *Logger) {
233 log.WithField("msg", "hello").Info("test")
234 }, func(fields Fields) {
235 assert.Equal(t, "test", fields["msg"])
236 assert.Equal(t, "hello", fields["fields.msg"])
237 })
238}
239
240func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) {
241 LogAndAssertJSON(t, func(log *Logger) {

Callers

nothing calls this directly

Calls 3

LogAndAssertJSONFunction · 0.85
InfoMethod · 0.65
WithFieldMethod · 0.65

Tested by

no test coverage detected