()
| 88 | } |
| 89 | |
| 90 | func NewTestLog() *testLog { |
| 91 | oldOut := log.StandardLogger().Out |
| 92 | oldLevel := log.GetLevel() |
| 93 | log.SetLevel(log.DebugLevel) |
| 94 | |
| 95 | tl := &testLog{oldOut: oldOut, oldLevel: oldLevel} |
| 96 | log.SetOutput(tl) |
| 97 | return tl |
| 98 | } |
| 99 | |
| 100 | func (l *testLog) Write(p []byte) (int, error) { |
| 101 | l.mu.Lock() |
no test coverage detected
searching dependent graphs…