private static String getAuthority(RequestLog log) {
        final RequestContext ctx = log.context();
        if (log.isAvailable(RequestLogProperty.REQUEST_HEADERS)) {
            final String authority = getAuthority0(ctx, log.requestHeaders());
            if (authority != null) {
                return authority;
            }
        }

        final HttpRequest origReq = ctx.request();
        if (origReq != null) {
            final String authority = getAuthority0(ctx, origReq.headers());
            if (authority != null) {
                return authority;
            }
        }

        final String authority;
        if (ctx instanceof ServiceRequestContext) {
            final ServiceRequestContext sCtx = (ServiceRequestContext) ctx;
            final int port = sCtx.remoteAddress().getPort();
            final String hostname = sCtx.config().virtualHost().defaultHostname();
            if (port == ctx.sessionProtocol().defaultPort()) {
                authority = hostname;
            } else {
                authority = hostname + ':' + port;
            }
        } else {
            final ClientRequestContext cCtx = (ClientRequestContext) ctx;
            final Endpoint endpoint = cCtx.endpoint();
            if (endpoint == null) {
                authority = "UNKNOWN";
            } else {
                final int defaultPort = cCtx.sessionProtocol().defaultPort();
                final int port = endpoint.port(defaultPort);
                if (port == defaultPort) {
                    authority = endpoint.host();
                } else {
                    authority = endpoint.host() + ':' + port;
                }
            }
        }
        return authority;
    }
{@code "tls.proto"} - the current {@linkplain SSLSession#getProtocol() TLS protocol}.
Unavailable if TLS handshake is not finished or the connection is not a TLS connection, such as
{@code "TLSv1.2"}.
core/src/main/java/com/linecorp/armeria/common/logging/BuiltInProperty.java