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

Function TestUserSuppliedTimeFieldHasPrefix

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

Source from the content-addressed store, hash-verified

238}
239
240func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) {
241 LogAndAssertJSON(t, func(log *Logger) {
242 log.WithField("time", "hello").Info("test")
243 }, func(fields Fields) {
244 assert.Equal(t, "hello", fields["fields.time"])
245 })
246}
247
248func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) {
249 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