@@ -12,6 +12,8 @@ var pionLog = logging.Logger("webrtc-transport-pion")
12
12
13
13
// pionLogger wraps the StandardLogger interface to provide a LeveledLogger interface
14
14
// as expected by pion
15
+ // Pion logs are too noisy and have invalid log levels. pionLogger downgrades all the
16
+ // logs to debug
15
17
type pionLogger struct {
16
18
logging.StandardLogger
17
19
}
@@ -25,20 +27,32 @@ func (l pionLogger) Debug(s string) {
25
27
}
26
28
27
29
func (l pionLogger ) Error (s string ) {
28
- l .StandardLogger .Error (s )
30
+ l .StandardLogger .Debug (s )
31
+ }
32
+
33
+ func (l pionLogger ) Errorf (s string , args ... interface {}) {
34
+ l .StandardLogger .Debugf (s , args ... )
29
35
}
30
36
31
37
func (l pionLogger ) Info (s string ) {
32
- l .StandardLogger .Info (s )
38
+ l .StandardLogger .Debug (s )
39
+ }
40
+
41
+ func (l pionLogger ) Infof (s string , args ... interface {}) {
42
+ l .StandardLogger .Debugf (s , args ... )
33
43
}
44
+
34
45
func (l pionLogger ) Warn (s string ) {
35
- l .StandardLogger .Warn (s )
46
+ l .StandardLogger .Debug (s )
47
+ }
48
+
49
+ func (l pionLogger ) Warnf (s string , args ... interface {}) {
50
+ l .StandardLogger .Debugf (s , args ... )
36
51
}
37
52
38
53
func (l pionLogger ) Trace (s string ) {
39
54
l .StandardLogger .Debug (s )
40
55
}
41
-
42
56
func (l pionLogger ) Tracef (s string , args ... interface {}) {
43
57
l .StandardLogger .Debugf (s , args ... )
44
58
}
0 commit comments