private static void maybeAppendConnectionTimings(@Nullable ClientConnectionTimings timings,
                                                     StringBuilder buf) {
        if (timings == null) {
            return;
        }
        buf.append(", Connection: {total=");
        TextFormatter.appendEpochAndElapsed(buf, timings.connectionAcquisitionStartTimeMicros(),
                                            timings.connectionAcquisitionDurationNanos());
        if (timings.dnsResolutionDurationNanos() >= 0) {
            buf.append(", dns=");
            TextFormatter.appendEpochAndElapsed(buf, timings.dnsResolutionStartTimeMicros(),
                                                timings.dnsResolutionDurationNanos());
        }
        if (timings.pendingAcquisitionDurationNanos() >= 0) {
            buf.append(", pending=");
            TextFormatter.appendEpochAndElapsed(buf, timings.pendingAcquisitionStartTimeMicros(),
                                                timings.pendingAcquisitionDurationNanos());
        }
        if (timings.socketConnectDurationNanos() >= 0) {
            buf.append(", socket=");
            TextFormatter.appendEpochAndElapsed(buf, timings.socketConnectStartTimeMicros(),
                                                timings.socketConnectDurationNanos());
        }
        if (timings.tlsHandshakeDurationNanos() >= 0) {
            buf.append(", tls=");
            TextFormatter.appendEpochAndElapsed(buf, timings.tlsHandshakeStartTimeMicros(),
                                                timings.tlsHandshakeDurationNanos());
        }
        buf.append('}');
    }
A formatter that converts {@link RequestOnlyLog} or {@link RequestLog} into text message.
core/src/main/java/com/linecorp/armeria/common/logging/TextLogFormatter.java