@Override
    public void write(RequestLogEntry entry, OutputStream outputStream) throws IOException {
        outputStream.write(
                toLogline(
                        entry.peerAddress().get(),
                        null,
                        getRequest(
                                entry.httpMethod().orElse(null),
                                entry.rawPath().orElse(null),
                                entry.rawQuery().orElse(null),
                                entry.httpVersion().orElse(null)),
                        entry.referer().orElse(null),
                        entry.userAgent().orElse(null),
                        entry.duration().get().toMillis(),
                        entry.responseSize().orElse(0L),
                        entry.hitCounts().orElse(null),
                        entry.statusCode().orElse(0)).getBytes(StandardCharsets.UTF_8));
    }
@author Bjorn Borud
@author Oyvind Bakksjo
container-core/src/main/java/com/yahoo/container/logging/VespaAccessLog.java