internal/testlog: document use of t.Helper

This commit is contained in:
Felix Lange 2020-01-08 15:39:42 +01:00
parent f534b77d8c
commit 6d492179df

View file

@ -39,8 +39,10 @@ func (h *handler) Log(r *log.Record) error {
return nil
}
// logger implements log.Logger such that all output goes to the
// unit test log via t.Logf().
// logger implements log.Logger such that all output goes to the unit test log via
// t.Logf(). All methods in between logger.Trace, logger.Debug, etc. are marked as test
// helpers, so the file and line number in unit test output correspond to the call site
// which emitted the log message.
type logger struct {
t *testing.T
l log.Logger