@@ -263,7 +263,8 @@ func (t *Torrent) Seed() {
263263 if t .Torrent .Seeding () {
264264 t .status = torrentSeeding
265265 elapsed := time .Duration (mclock .Now ()) - time .Duration (t .start )
266- log .Info ("Download success" , "hash" , t .InfoHash (), "size" , common .StorageSize (t .BytesCompleted ()), "files" , len (t .Files ()), "pieces" , t .Torrent .NumPieces (), "seg" , len (t .Torrent .PieceStateRuns ()), "cited" , t .cited , "conn" , t .currentConns , "elapsed" , elapsed )
266+ log .Info ("Finish downloading" , "hash" , t .InfoHash (), "elapsed" , elapsed )
267+ //log.Info("Download success", "hash", t.InfoHash(), "size", common.StorageSize(t.BytesCompleted()), "files", len(t.Files()), "pieces", t.Torrent.NumPieces(), "seg", len(t.Torrent.PieceStateRuns()), "cited", t.cited, "conn", t.currentConns, "elapsed", elapsed)
267268 //t.Torrent.Drop()
268269 } else {
269270 //t.Torrent.DownloadAll()
@@ -476,7 +477,7 @@ func (tm *TorrentManager) SetTorrent(ih metainfo.Hash, torrent *Torrent) {
476477 tm .torrents [ih ] = torrent
477478 tm .lock .Unlock ()
478479 tm .pendingChan <- torrent
479- log .Info ("P <- B" , "hash" , ih )
480+ log .Debug ("P <- B" , "hash" , ih )
480481}
481482
482483func (tm * TorrentManager ) Close () error {
@@ -784,7 +785,7 @@ func NewTorrentManager(config *Config, fsid uint64) *TorrentManager {
784785 // "max_activenum", config.MaxActiveNum,
785786 // )
786787 cfg := torrent .NewDefaultClientConfig ()
787- // cfg.DisableUTP = config.DisableUTP
788+ cfg .DisableUTP = config .DisableUTP
788789 cfg .NoDHT = config .DisableDHT
789790 cfg .DisableTCP = config .DisableTCP
790791
@@ -990,10 +991,10 @@ func (tm *TorrentManager) pendingTorrentLoop() {
990991 if t .Torrent .Info () != nil {
991992 if t .start == 0 {
992993 if t .isBoosting {
993- log .Info ("A <- P (BOOST)" , "hash" , ih , "pieces" , t . Torrent . NumPieces (), " boost" , t .isBoosting )
994+ log .Info ("A <- P (BOOST)" , "hash" , ih , "boost" , t .isBoosting )
994995 t .isBoosting = false
995996 } else {
996- log .Info ("A <- P (UDP)" , "hash" , ih , "pieces" , t . Torrent . NumPieces (), " boost" , t .isBoosting )
997+ log .Info ("A <- P (UDP)" , "hash" , ih , "boost" , t .isBoosting )
997998 }
998999 t .AddTrackers (tm .trackers )
9991000 t .start = mclock .Now ()
@@ -1161,7 +1162,7 @@ func (tm *TorrentManager) activeTorrentLoop() {
11611162 if len (tm .seedingChan ) < cap (tm .seedingChan ) {
11621163 log .Debug ("Path exist" , "hash" , ih , "path" , path .Join (tm .DataDir , ih .String ()))
11631164 delete (tm .activeTorrents , ih )
1164- log .Info ("S <- A" , "hash" , ih ) //, "elapsed", time.Duration(mclock.Now())-time.Duration(t.start))
1165+ log .Debug ("S <- A" , "hash" , ih ) //, "elapsed", time.Duration(mclock.Now())-time.Duration(t.start))
11651166 //t.start = mclock.Now()
11661167 tm .seedingChan <- t
11671168 }
@@ -1180,7 +1181,7 @@ func (tm *TorrentManager) activeTorrentLoop() {
11801181 } else {
11811182 if len (tm .seedingChan ) < cap (tm .seedingChan ) {
11821183 delete (tm .activeTorrents , ih )
1183- log .Info ("S <- A" , "hash" , ih ) //, "elapsed", time.Duration(mclock.Now())-time.Duration(t.start))
1184+ log .Debug ("S <- A" , "hash" , ih ) //, "elapsed", time.Duration(mclock.Now())-time.Duration(t.start))
11841185 //t.start = mclock.Now()
11851186 tm .seedingChan <- t
11861187 }
0 commit comments