synchronized ConnectionLogEntry toLogEntry() {
            ConnectionLogEntry.Builder builder = ConnectionLogEntry.builder(uuid, Instant.ofEpochMilli(createdAt));
            if (closedAt > 0) {
                builder.withDuration((closedAt - createdAt) / 1000D);
            }
            if (httpBytesReceived > 0) {
                builder.withHttpBytesReceived(httpBytesReceived);
            }
            if (httpBytesSent > 0) {
                builder.withHttpBytesSent(httpBytesSent);
            }
            if (requests > 0) {
                builder.withRequests(requests);
            }
            if (responses > 0) {
                builder.withResponses(responses);
            }
            if (peerAddress != null) {
                builder.withPeerAddress(peerAddress.getHostString())
                        .withPeerPort(peerAddress.getPort());
            }
            if (localAddress != null) {
                builder.withLocalAddress(localAddress.getHostString())
                        .withLocalPort(localAddress.getPort());
            }
            if (remoteAddress instanceof InetSocketAddress isa) {
                builder.withRemoteAddress(isa.getHostString())
                        .withRemotePort(isa.getPort());
            }
            if (sslProtocol != null && sslCipherSuite != null && sslSessionId != null) {
                builder.withSslProtocol(sslProtocol)
                        .withSslCipherSuite(sslCipherSuite)
                        .withSslSessionId(HexDump.toHexString(sslSessionId));
            }
            if (sslSniServerNames != null) {
                sslSniServerNames.stream()
                        .filter(name -> name instanceof SNIHostName && name.getType() == StandardConstants.SNI_HOST_NAME)
                        .map(name -> ((SNIHostName) name).getAsciiName())
                        .findAny()
                        .ifPresent(builder::withSslSniServerName);
            }
            if (sslPeerSubject != null && sslPeerNotAfter != null && sslPeerNotBefore != null
                    && sslPeerIssuerSubject != null && sslPeerEncodedCertificate != null) {
                builder.withSslPeerSubject(sslPeerSubject)
                        .withSslPeerIssuerSubject(sslPeerIssuerSubject)
                        .withSslPeerNotAfter(sslPeerNotAfter.toInstant())
                        .withSslPeerNotBefore(sslPeerNotBefore.toInstant())
                        .withSslPeerFingerprint(certificateFingerprint(sslPeerEncodedCertificate));
            }
            if (sslSubjectAlternativeNames != null && !sslSubjectAlternativeNames.isEmpty()) {
                builder.withSslSubjectAlternativeNames(sslSubjectAlternativeNames);
            }
            if (sslHandshakeException != null) {
                List<ExceptionEntry> exceptionChain = new ArrayList<>();
                Throwable cause = sslHandshakeException;
                while (cause != null) {
                    exceptionChain.add(new ExceptionEntry(cause.getClass().getName(), cause.getMessage()));
                    cause = cause.getCause();
                }
                String type = SslHandshakeFailure.fromSslHandshakeException(sslHandshakeException)
                        .map(SslHandshakeFailure::failureType)
                        .orElse("UNKNOWN");
                builder.withSslHandshakeFailure(new ConnectionLogEntry.SslHandshakeFailure(type, exceptionChain));
            }
            if (httpProtocol != null) {
                builder.withHttpProtocol(httpProtocol);
            }
            if (proxyProtocolVersion != null) {
                builder.withProxyProtocolVersion(proxyProtocolVersion);
            }
            if (sslBytesReceived > 0) {
                builder.withSslBytesReceived(sslBytesReceived);
            }
            if (sslBytesSent > 0) {
                builder.withSslBytesSent(sslBytesSent);
            }
            return builder.build();
        }
Protocol layers are connected through each {@link Connection}'s {@link EndPoint} reference.
This methods iterates through the endpoints recursively to find the underlying socket endpoint.
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/JettyConnectionLogger.java