PanicOnLog modifies the standard library log package's default output to an io.Writer that panics, to root out code that's not plumbing their logging through explicit tailscale.com/logger.Logf paths.
()
| 56 | // an io.Writer that panics, to root out code that's not plumbing their logging |
| 57 | // through explicit tailscale.com/logger.Logf paths. |
| 58 | func PanicOnLog() { |
| 59 | log.SetOutput(panicLogWriter{}) |
| 60 | } |
| 61 | |
| 62 | // NewLogLineTracker produces a LogLineTracker wrapping a given logf that tracks whether expectedFormatStrings were seen. |
| 63 | func NewLogLineTracker(logf logger.Logf, expectedFormatStrings []string) *LogLineTracker { |
no outgoing calls
searching dependent graphs…