(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func TestEmptyHeader(t *testing.T) { |
| 123 | l := New("test") |
| 124 | b := new(bytes.Buffer) |
| 125 | l.SetOutput(b) |
| 126 | l.SetHeader("") |
| 127 | l.SetLevel(DEBUG) |
| 128 | l.Debugf("captain's log") |
| 129 | assert.Contains(t, b.String(), `captain's log`) |
| 130 | } |
| 131 | |
| 132 | // TestCallerFile verifies that both text and JSON log paths report the |
| 133 | // user's call site, not an internal wrapper frame. This guards against |