diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-30 09:13:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-30 09:13:11 +0200 |
commit | a4152bed14427ef91f69e11d1a2cd9745aa74408 (patch) | |
tree | 48641df5833148fc618389d237b6c6f45cfa03a8 /server/controllers/tracker.ts | |
parent | 090d100cc370900a032f7379fd1287da91fa1992 (diff) | |
download | PeerTube-a4152bed14427ef91f69e11d1a2cd9745aa74408.tar.gz PeerTube-a4152bed14427ef91f69e11d1a2cd9745aa74408.tar.zst PeerTube-a4152bed14427ef91f69e11d1a2cd9745aa74408.zip |
Add ability to disable unknown infohash log
Diffstat (limited to 'server/controllers/tracker.ts')
-rw-r--r-- | server/controllers/tracker.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts index 6d60639b8..914d52b72 100644 --- a/server/controllers/tracker.ts +++ b/server/controllers/tracker.ts | |||
@@ -69,12 +69,16 @@ const trackerServer = new TrackerServer({ | |||
69 | }) | 69 | }) |
70 | 70 | ||
71 | if (CONFIG.TRACKER.ENABLED !== false) { | 71 | if (CONFIG.TRACKER.ENABLED !== false) { |
72 | |||
73 | trackerServer.on('error', function (err) { | 72 | trackerServer.on('error', function (err) { |
74 | logger.error('Error in tracker.', { err }) | 73 | logger.error('Error in tracker.', { err }) |
75 | }) | 74 | }) |
76 | 75 | ||
77 | trackerServer.on('warning', function (err) { | 76 | trackerServer.on('warning', function (err) { |
77 | if (CONFIG.LOG.LOG_TRACKER_UNKNOWN_INFOHASH) { | ||
78 | const message = err.message || '' | ||
79 | if (message.includes('Uknown infoHash')) return | ||
80 | } | ||
81 | |||
78 | logger.warn('Warning in tracker.', { err }) | 82 | logger.warn('Warning in tracker.', { err }) |
79 | }) | 83 | }) |
80 | } | 84 | } |