static byte[] toLogRequest(List<LogMessage> logMessages) {
        LogProtocol.LogRequest.Builder builder = LogProtocol.LogRequest.newBuilder();
        for (LogMessage logMessage : logMessages) {
            builder.addLogMessages(toLogRequestMessage(logMessage));
        }
        return builder.build().toByteArray();
    }
Utility class for serialization of log requests and responses.

@author bjorncs
logserver/src/main/java/ai/vespa/logserver/protocol/ProtobufSerialization.java