Update deps and go version (#202)
This commit is contained in:
parent
e54a501278
commit
8e5fc6d6fc
6 changed files with 290 additions and 987 deletions
torrent
|
@ -8,9 +8,10 @@ import (
|
|||
tlog "github.com/anacrolix/log"
|
||||
"github.com/anacrolix/torrent"
|
||||
"github.com/anacrolix/torrent/storage"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/distribyted/distribyted/config"
|
||||
dlog "github.com/distribyted/distribyted/log"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func NewClient(st storage.ClientImpl, fis bep44.Store, cfg *config.TorrentGlobal, id [20]byte) (*torrent.Client, error) {
|
||||
|
@ -22,7 +23,10 @@ func NewClient(st storage.ClientImpl, fis bep44.Store, cfg *config.TorrentGlobal
|
|||
torrentCfg.DisableIPv6 = cfg.DisableIPv6
|
||||
|
||||
l := log.Logger.With().Str("component", "torrent-client").Logger()
|
||||
torrentCfg.Logger = tlog.Logger{LoggerImpl: &dlog.Torrent{L: l}}
|
||||
|
||||
tl := tlog.NewLogger()
|
||||
tl.SetHandlers(&dlog.Torrent{L: l})
|
||||
torrentCfg.Logger = tl
|
||||
|
||||
torrentCfg.ConfigureAnacrolixDhtServer = func(cfg *dht.ServerConfig) {
|
||||
cfg.Store = fis
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue