]> Sergey Matveev's repositories - btrtrc.git/blobdiff - webtorrent/transport.go
Fix webrtc logging for JS build
[btrtrc.git] / webtorrent / transport.go
index 511ab59583999f67e55a08ee3748957348f6da44..e4c3b73d88dd9d55094523b8992c44d7613a93d9 100644 (file)
@@ -8,24 +8,13 @@ import (
 
        "github.com/anacrolix/missinggo/v2/pproffd"
        "github.com/pion/datachannel"
-       "github.com/pion/logging"
-
        "github.com/pion/webrtc/v3"
 )
 
-type DiscardLoggerFactory struct{}
-
-func (f *DiscardLoggerFactory) NewLogger(scope string) logging.LeveledLogger {
-       return logging.NewDefaultLeveledLoggerForScope(scope, logging.LogLevelInfo, io.Discard)
-}
-
 var (
        metrics = expvar.NewMap("webtorrent")
        api     = func() *webrtc.API {
                // Enable the detach API (since it's non-standard but more idiomatic).
-               s := webrtc.SettingEngine{
-                       LoggerFactory: &DiscardLoggerFactory{},
-               }
                s.DetachDataChannels()
                return webrtc.NewAPI(webrtc.WithSettingEngine(s))
        }()