]> Sergey Matveev's repositories - btrtrc.git/blob - webtorrent/setting-engine.go
go1.19 compatibility
[btrtrc.git] / webtorrent / setting-engine.go
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/v3"
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 }