Update deps and go version ()

This commit is contained in:
Antonio Navarro Perez 2023-09-05 17:05:27 +02:00 committed by GitHub
parent e54a501278
commit 8e5fc6d6fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 290 additions and 987 deletions
torrent

View file

@ -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