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:
+20
-3
@@ -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],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user