private static void render(JsonGenerator json, OutputNode node) throws IOException {
        json.writeStringField("type", "output");
        json.writeArrayFieldStart("children");
        for (LogRecord record : node.log()) {
            json.writeStartObject();
            json.writeStringField("message", (record.getLoggerName() == null ? "" : record.getLoggerName() + ": ") +
                                             (record.getMessage() != null ? record.getMessage() : "") +
                                             (record.getThrown() != null ? (record.getMessage() != null ? "\n" : "") + traceToString(record.getThrown()) : ""));
            json.writeNumberField("at", record.getInstant().toEpochMilli());
            json.writeStringField("level", typeOf(record.getLevel()));
            json.writeEndObject();
        }
        json.writeEndArray();
    }
@author valerijf
@author jonmv
@author mortent
vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TestRunnerHandler.java