Updated log messages

This commit is contained in:
Robinson 2023-02-20 19:27:53 +01:00
parent 80e2a57d74
commit a1a869346e
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 8 additions and 8 deletions

View File

@ -515,6 +515,12 @@ open class Client<CONNECTION : Connection>(
// once we're done with the connection process, stop trying
break
} catch (e: ClientRetryException) {
if (logger.isTraceEnabled) {
logger.trace(e) { "Unable to connect to $type, retrying..." }
} else {
logger.info { "Unable to connect to $type, retrying..." }
}
handshake.reset()
// maybe the aeron driver isn't running? (or isn't running correctly?)
@ -528,12 +534,6 @@ open class Client<CONNECTION : Connection>(
// ALSO, we want to make sure we DO NOT approach the linger timeout!
sleep(aeronDriver.driverTimeout().coerceAtLeast(TimeUnit.NANOSECONDS.toSeconds(aeronDriver.getLingerNs()*2)))
if (logger.isTraceEnabled) {
logger.trace(e) { "Unable to connect to $type, retrying..." }
} else {
logger.info { "Unable to connect to $type, retrying..." }
}
} catch (e: ClientRejectedException) {
aeronDriver.closeIfSingle() // if we are the ONLY instance using the media driver, restart it
@ -582,7 +582,7 @@ open class Client<CONNECTION : Connection>(
}
// If we did not connect - throw an error. When `client.connect()` is called, either it connects or throws an error
val exception = ClientRejectedException("The server did not respond or permit the connection attempt")
val exception = ClientRejectedException("The server did not respond or permit the connection attempt within $connectionTimeoutSec seconds")
ListenerManager.cleanStackTrace(exception)
logger.error(exception) { "Aborting connection retry attempt to server." }

View File

@ -184,7 +184,7 @@ class AeronContext(
}
}
logger.info { "Aeron directory: '${context.aeronDirectory()}'" }
logger.debug { "Aeron directory: '${context.aeronDirectory()}'" }
this.context = context
}