From 39d48c3db8d791c56305312b6aaf0c39b591f2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 13 Jan 2021 21:36:43 +0100 Subject: [PATCH] ignore duplicated packet log messages. --- internal/webrtc/logger.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/webrtc/logger.go b/internal/webrtc/logger.go index cf18302f..4dfc1058 100644 --- a/internal/webrtc/logger.go +++ b/internal/webrtc/logger.go @@ -41,18 +41,18 @@ func (l logger) Debugf(format string, args ...interface{}) { l.logger.Debug().Msg(strings.TrimSpace(msg)) } func (l logger) Info(msg string) { - if strings.Contains(msg, "packetio.Buffer is full") { - //l.logger.Panic().Msg(msg) + if strings.Contains(msg, "duplicated packet") { return } + l.logger.Info().Msg(strings.TrimSpace(msg)) } func (l logger) Infof(format string, args ...interface{}) { msg := fmt.Sprintf(format, args...) - if strings.Contains(msg, "packetio.Buffer is full") { - // l.logger.Panic().Msg(msg) + if strings.Contains(msg, "duplicated packet") { return } + l.logger.Info().Msg(strings.TrimSpace(msg)) } func (l logger) Warn(msg string) {