Skip to content

Commit

Permalink
webrtc: reduce pion logs loglevel
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Aug 15, 2024
1 parent fda0eca commit e55d62d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions p2p/transport/webrtc/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ var pionLog = logging.Logger("webrtc-transport-pion")

// pionLogger wraps the StandardLogger interface to provide a LeveledLogger interface
// as expected by pion
// Pion logs are too noisy and have invalid log levels. pionLogger downgrades all the
// logs to debug
type pionLogger struct {
logging.StandardLogger
}
Expand All @@ -25,14 +27,14 @@ func (l pionLogger) Debug(s string) {
}

func (l pionLogger) Error(s string) {
l.StandardLogger.Error(s)
l.StandardLogger.Debug(s)
}

func (l pionLogger) Info(s string) {
l.StandardLogger.Info(s)
l.StandardLogger.Debug(s)
}
func (l pionLogger) Warn(s string) {
l.StandardLogger.Warn(s)
l.StandardLogger.Debug(s)
}

func (l pionLogger) Trace(s string) {
Expand Down

0 comments on commit e55d62d

Please sign in to comment.