TestLogCollector is a simple logger that captures logs for analysis It is thread safe and can be used to capture logs from multiple clients It uses type logs to provide additional functionality like filtering and analysis
| 69 | // It uses type logs to provide additional functionality like filtering |
| 70 | // and analysis |
| 71 | type TestLogCollector struct { |
| 72 | l logs |
| 73 | doPrint bool |
| 74 | matchFuncs []*MatchFunc |
| 75 | matchFuncsMutex sync.Mutex |
| 76 | mu sync.Mutex |
| 77 | } |
| 78 | |
| 79 | func (tlc *TestLogCollector) DontPrint() { |
| 80 | tlc.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected