diff --git a/DHTSpider.Test/NLog.config b/DHTSpider.Test/NLog.config index 75cf03a..fd5d3b0 100644 --- a/DHTSpider.Test/NLog.config +++ b/DHTSpider.Test/NLog.config @@ -28,8 +28,17 @@ --> - + + @@ -40,5 +49,11 @@ --> + diff --git a/DHTSpider.Test/Spider.cs b/DHTSpider.Test/Spider.cs index cac5f4c..bdf2194 100644 --- a/DHTSpider.Test/Spider.cs +++ b/DHTSpider.Test/Spider.cs @@ -93,7 +93,7 @@ namespace DHTSpider.Test { if (Filter == null || (Filter != null && Filter.Ignore(infohash))) { - //Logger.Info($"InfoHash:{infohash} Address:{endpoint.Address} Port:{endpoint.Port}"); + Logger.Info($"InfoHash:{infohash} Address:{endpoint.Address} Port:{endpoint.Port}"); NewMetadata?.Invoke(this, new NewMetadataEventArgs(infohash, endpoint)); Queue.Enqueue(new KeyValuePair(infohash, endpoint)); } @@ -171,6 +171,15 @@ namespace DHTSpider.Test { Download(); }); + + Task.Run(() => + { + while (true) + { + Logger.Success($"Queue:{Queue.Count}"); + Thread.Sleep(5000); + } + }); } public void Stop() {