configurable ping fail logs (#203)

* ping fail log configurable

* fix json

* fix config namespace in ping

* changes
This commit is contained in:
blockparole 2020-08-17 01:18:43 +02:00 committed by GitHub
parent 9f8c2b5fa6
commit 6ce1697a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

@ -9,6 +9,7 @@
"pingAll": 3000,
"connectTimeout": 2500
},
"logFailedPings": true,
"logToDatabase": false,
"graphDuration": 86400000,
"serverGraphDuration": 180000

@ -135,7 +135,7 @@ class PingController {
const version = serverRegistration.getNextProtocolVersion()
ping(serverRegistration, config.rates.connectTimeout, (err, resp) => {
if (err) {
if (err && config.logFailedPings !== false) {
logger.log('error', 'Failed to ping %s: %s', serverRegistration.data.ip, err.message)
}