more logging

This commit is contained in:
Robinson 2023-10-18 19:46:34 +02:00
parent de6d22f808
commit 46cb174183
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 9 additions and 4 deletions

View File

@ -774,9 +774,11 @@ open class Client<CONNECTION : Connection>(config: ClientConfiguration = ClientC
// NOTE: Client can ALWAYS connect to the server. The server makes the decision if the client can connect or not.
val connType = if (newConnection is SessionConnection) "Session connection" else "Connection"
if (logger.isTraceEnabled) {
logger.trace("[${handshakeConnection.details}] (${handshake.connectKey}) $connType (${newConnection.id}) adding new signature for [$addressString] : ${connectionInfo.publicKey.toHexString()}")
logger.trace("[${handshakeConnection.details}] (${handshake.connectKey}) $connType (${newConnection.id}) adding new signature for [$addressString -> ${connectionInfo.publicKey.toHexString()}]")
} else if (logger.isDebugEnabled) {
logger.debug("[${handshakeConnection.details}] $connType (${newConnection.id}) adding new signature for [$addressString -> ${connectionInfo.publicKey.toHexString()}]")
} else if (logger.isInfoEnabled) {
logger.info("[${handshakeConnection.details}] $connType (${newConnection.id}) adding new signature for [$addressString] : ${connectionInfo.publicKey.toHexString()}")
logger.info("[${handshakeConnection.details}] $connType adding new signature for [$addressString -> ${connectionInfo.publicKey.toHexString()}]")
}
storage.addRegisteredServerKey(address!!, connectionInfo.publicKey)

View File

@ -707,6 +707,9 @@ internal class AeronDriverInternal(endPoint: EndPoint<*>?, config: Configuration
// THIS CAN TAKE A WHILE TO ACTUALLY CLOSE!
while (subscription.isConnected || subscription.channelStatus() == ChannelEndpointStatus.ACTIVE || subscription.images().isNotEmpty()) {
Thread.sleep(AERON_PUB_SUB_TIMEOUT)
if (logger.isTraceEnabled) {
logger.trace("Aeron Driver [$driverId]: Still closing sub!")
}
}
// deleting log files is generally not recommended in a production environment as it can result in data loss and potential disruption of the messaging system!!
@ -861,8 +864,8 @@ internal class AeronDriverInternal(endPoint: EndPoint<*>?, config: Configuration
endPointUsages.remove(endPoint)
}
if (logger.isTraceEnabled) {
logger.trace("Aeron Driver [$driverId]: Requested close... (${endPointUsages.size()} endpoints still in use)")
if (logger.isDebugEnabled) {
logger.debug("Aeron Driver [$driverId]: Requested close... (${endPointUsages.size()} endpoints still in use)")
}
// ignore the extra driver checks, because in SOME situations, when trying to reconnect upon an error, the