NewTestingWriter builds a new TestingWriter that writes to the given testing.TB. Use this if you need more flexibility when creating *zap.Logger than zaptest.NewLogger() provides. E.g., if you want to use custom core with zaptest.TestingWriter: encoder := newCustomEncoder() writer := zaptest.Ne
(t TestingT)
| 125 | // |
| 126 | // logger := zap.New(core, zap.AddCaller()) |
| 127 | func NewTestingWriter(t TestingT) TestingWriter { |
| 128 | return TestingWriter{t: t} |
| 129 | } |
| 130 | |
| 131 | // WithMarkFailed returns a copy of this TestingWriter with markFailed set to |
| 132 | // the provided value. |
no outgoing calls