private String toLogline(String ipAddr, String user, String request, String referer, String agent,
                          long durationMillis, long byteCount, HitCounts hitcounts, int returnCode)
    {
        long ms = Math.max(0L, durationMillis);
        StringBuilder sb = new StringBuilder()
                .append(ipAddr)
                .append(" - ")
                .append(getUser(user))
                .append(' ')
                .append(getDate())
                .append(" \"")
                .append(request)
                .append("\" ")
                .append(returnCode)
                .append(' ')
                .append(byteCount)
                .append(" \"")
                .append(referer)
                .append("\" \"")
                .append(agent)
                .append("\" ")
                .append(ms/1000)
                .append('.');
        decimalsOfSecondsFromMilliseconds(ms, sb);
        sb.append(' ')
                .append((hitcounts == null) ? 0 : hitcounts.getTotalHitCount())
                .append(" 0.0 ")
                .append((hitcounts == null) ? 0 : hitcounts.getSummaryCount());
        return sb.toString();
    }
@author Bjorn Borud
@author Oyvind Bakksjo
container-core/src/main/java/com/yahoo/container/logging/VespaAccessLog.java