configurable ping fail logs (#203)
* ping fail log configurable * fix json * fix config namespace in ping * changes
This commit is contained in:
parent
9f8c2b5fa6
commit
6ce1697a39
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user