TLog changes the log package's output to log to t and returns a function to reset it back to stderr.
(t testing.TB)
| 40 | // TLog changes the log package's output to log to t and returns a function |
| 41 | // to reset it back to stderr. |
| 42 | func TLog(t testing.TB) func() { |
| 43 | log.SetOutput(twriter{t: t}) |
| 44 | return func() { |
| 45 | log.SetOutput(os.Stderr) |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | type twriter struct { |
| 50 | t testing.TB |
no outgoing calls