| skipped 1 lines |
2 | 2 | | |
3 | 3 | | import ( |
4 | 4 | | "io" |
| 5 | + | "runtime" |
| 6 | + | "strings" |
5 | 7 | | "time" |
6 | 8 | | |
7 | 9 | | glog "gvisor.dev/gvisor/pkg/log" |
| skipped 13 lines |
21 | 23 | | |
22 | 24 | | type emitter struct{} |
23 | 25 | | |
24 | | - | func (emitter) Emit(_ int, level glog.Level, _ time.Time, format string, args ...any) { |
| 26 | + | func (emitter) Emit(depth int, level glog.Level, _ time.Time, format string, args ...any) { |
| 27 | + | if _, file, line, ok := runtime.Caller(depth + 1); ok { |
| 28 | + | // Ignore (*gonet.TCPConn).RemoteAddr() warning: `ep.GetRemoteAddress() failed`. |
| 29 | + | if line == 457 && strings.HasSuffix(file, "/pkg/tcpip/adapters/gonet/gonet.go") { |
| 30 | + | return |
| 31 | + | } |
| 32 | + | } |
25 | 33 | | logf(Level(level)+2, "[STACK] "+format, args...) |
26 | 34 | | } |
27 | 35 | | |