github.com/anacrolix/torrent@v1.61.0/webtorrent/setting-engine.go (about) 1 // These build constraints are copied from webrtc's settingengine.go. 2 //go:build !js 3 // +build !js 4 5 package webtorrent 6 7 import ( 8 "io" 9 10 "github.com/pion/logging" 11 "github.com/pion/webrtc/v4" 12 ) 13 14 var s = webrtc.SettingEngine{ 15 // This could probably be done with better integration into anacrolix/log, but I'm not sure if 16 // it's worth the effort. 17 LoggerFactory: discardLoggerFactory{}, 18 } 19 20 type discardLoggerFactory struct{} 21 22 func (discardLoggerFactory) NewLogger(scope string) logging.LeveledLogger { 23 return logging.NewDefaultLeveledLoggerForScope(scope, logging.LogLevelInfo, io.Discard) 24 }