Cleanup pass through logging (#1073)

* added filtering for noisy pion logs
* demoted some logs to debug
* using consistent trackID / participant / publisher / subscriber terminology
* removed ice candidate log lines, deferring to combined log
This commit is contained in:
David Zhao
2022-10-06 23:48:37 -07:00
committed by GitHub
parent 792349cc56
commit 1019faa0e6
16 changed files with 114 additions and 55 deletions
+20 -3
View File
@@ -11,7 +11,23 @@ import (
)
var (
pionLevel zapcore.Level
pionLevel zapcore.Level
pionIgnoredPrefixes = map[string][]string{
"ice": {
"pingAllCandidates called with no candidate pairs",
"failed to send packet",
"Ignoring remote candidate with tcpType active",
},
"pc": {
"Failed to accept RTCP stream is already closed",
"Failed to accept RTP stream is already closed",
"Incoming unhandled RTCP ssrc",
},
"tcp_mux": {
"Error reading first packet from",
"error closing connection",
},
}
)
// implements webrtc.LoggerFactory
@@ -30,8 +46,9 @@ func NewLoggerFactory(logger logr.Logger) *LoggerFactory {
func (f *LoggerFactory) NewLogger(scope string) logging.LeveledLogger {
return &logAdapter{
logger: f.logger.WithName(scope),
level: pionLevel,
logger: f.logger.WithName(scope),
level: pionLevel,
ignoredPrefixes: pionIgnoredPrefixes[scope],
}
}