Simplify the toString, so that printing ConnectionChange events into the log output only gives a summary and reduce logging. (#3247)

This commit is contained in:
Matthew Nesbit 2018-05-29 18:18:31 +01:00 committed by GitHub
parent ac212972ea
commit 202bd6603b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,4 +3,8 @@ package net.corda.nodeapi.internal.protonwrapper.netty
import java.net.InetSocketAddress
import java.security.cert.X509Certificate
data class ConnectionChange(val remoteAddress: InetSocketAddress, val remoteCert: X509Certificate?, val connected: Boolean, val badCert: Boolean)
data class ConnectionChange(val remoteAddress: InetSocketAddress, val remoteCert: X509Certificate?, val connected: Boolean, val badCert: Boolean) {
override fun toString(): String {
return "ConnectionChange remoteAddress: $remoteAddress connected state: $connected cert subject: ${remoteCert?.subjectDN} cert ok: ${!badCert}"
}
}