From 6edaee1853ba4a12fcb68e050ffa22be94615dc0 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 18 Oct 2023 15:27:41 +0700 Subject: [PATCH] downloader: less webseed logs (#8510) --- erigon-lib/downloader/downloadercfg/logger.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/erigon-lib/downloader/downloadercfg/logger.go b/erigon-lib/downloader/downloadercfg/logger.go index 8878e9004..ed0b79345 100644 --- a/erigon-lib/downloader/downloadercfg/logger.go +++ b/erigon-lib/downloader/downloadercfg/logger.go @@ -139,15 +139,24 @@ func (b adapterHandler) Handle(r lg.Record) { //if strings.Contains(str, "don't want conns") { // suppress useless errors // break //} - //if strings.Contains(str, "torrent closed") { // suppress useless errors - // break - //} + if strings.Contains(str, "torrent closed") { // suppress useless errors + break + } if skip { break } log.Error(str) default: + str := r.String() + skip := false + if strings.Contains(str, "unhandled response status") { // suppress useless errors + break + } + if skip { + break + } + log.Info("[downloader] "+r.String(), "torrent_log_type", "unknown", "or", lvl.LogString()) } }