public static void log(RequestContext ctx, RequestLog requestLog, LogWriter logWriter) {
        if (requestLog.requestCause() != null || !isTransientService(ctx)) {
            try {
                logWriter.logRequest(requestLog);
            } catch (Throwable t) {
                logException(ctx, "request", t);
            }
        }
        if (requestLog.responseCause() != null ||
            requestLog.responseHeaders().status().isServerError() ||
            !isTransientService(ctx)) {
            try {
                logWriter.logResponse(requestLog);
            } catch (Throwable t) {
                logException(ctx, "response", t);
            }
        }
    }
Logs request and response using the specified {@link LogWriter}.
core/src/main/java/com/linecorp/armeria/internal/common/logging/LoggingUtils.java