diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/tracker.ts | 6 | ||||
-rw-r--r-- | server/initializers/config.ts | 1 |
2 files changed, 6 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 | } |
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index c76a839bc..754585981 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -164,6 +164,7 @@ const CONFIG = { | |||
164 | }, | 164 | }, |
165 | ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'), | 165 | ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'), |
166 | LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'), | 166 | LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'), |
167 | LOG_TRACKER_UNKNOWN_INFOHASH: config.get<boolean>('log.log_tracker_unknown_infohash'), | ||
167 | PRETTIFY_SQL: config.get<boolean>('log.prettify_sql') | 168 | PRETTIFY_SQL: config.get<boolean>('log.prettify_sql') |
168 | }, | 169 | }, |
169 | TRENDING: { | 170 | TRENDING: { |