mirror of https://github.com/perkeep/perkeep.git
test: add NewLogger func
Change-Id: I38cee8fd2e2670088acc1332430aca9725cef13f
This commit is contained in:
parent
749ba38b18
commit
04726cfad1
|
@ -65,3 +65,8 @@ func (w *twriter) Write(p []byte) (n int, err error) {
|
|||
io.CopyN(ioutil.Discard, &w.buf, int64(i)+1)
|
||||
}
|
||||
}
|
||||
|
||||
// NewLogger returns a logger that logs to t with the given prefix.
|
||||
func NewLogger(t *testing.T, prefix string) *log.Logger {
|
||||
return log.New(&twriter{t: t}, prefix, log.LstdFlags)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue