diff --git a/p2p/transport/webrtc/logger.go b/p2p/transport/webrtc/logger.go index ac9fab7672..ebe5fa309f 100644 --- a/p2p/transport/webrtc/logger.go +++ b/p2p/transport/webrtc/logger.go @@ -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 } @@ -25,20 +27,32 @@ func (l pionLogger) Debug(s string) { } func (l pionLogger) Error(s string) { - l.StandardLogger.Error(s) + l.StandardLogger.Debug(s) +} + +func (l pionLogger) Errorf(s string, args ...interface{}) { + l.StandardLogger.Debugf(s, args...) } func (l pionLogger) Info(s string) { - l.StandardLogger.Info(s) + l.StandardLogger.Debug(s) +} + +func (l pionLogger) Infof(s string, args ...interface{}) { + l.StandardLogger.Debugf(s, args...) } + func (l pionLogger) Warn(s string) { - l.StandardLogger.Warn(s) + l.StandardLogger.Debug(s) +} + +func (l pionLogger) Warnf(s string, args ...interface{}) { + l.StandardLogger.Debugf(s, args...) } func (l pionLogger) Trace(s string) { l.StandardLogger.Debug(s) } - func (l pionLogger) Tracef(s string, args ...interface{}) { l.StandardLogger.Debugf(s, args...) }