(t *testing.T)
| 113 | } |
| 114 | |
| 115 | func TestLoggerInitialFields(t *testing.T) { |
| 116 | fieldOpts := opts(Fields(Int("foo", 42), String("bar", "baz"))) |
| 117 | withLogger(t, DebugLevel, fieldOpts, func(logger *Logger, logs *observer.ObservedLogs) { |
| 118 | logger.Info("") |
| 119 | assert.Equal( |
| 120 | t, |
| 121 | observer.LoggedEntry{Context: []Field{Int("foo", 42), String("bar", "baz")}}, |
| 122 | logs.AllUntimed()[0], |
| 123 | "Unexpected output with initial fields set.", |
| 124 | ) |
| 125 | }) |
| 126 | } |
| 127 | |
| 128 | func TestLoggerWith(t *testing.T) { |
| 129 | tests := []struct { |
nothing calls this directly
no test coverage detected