private static LogMessage fromLogRequest(LogProtocol.LogMessage message) {
        return LogMessage.of(
                Instant.ofEpochSecond(0, message.getTimeNanos()),
                message.getHostname(),
                message.getProcessId(),
                message.getThreadId(),
                message.getService(),
                message.getComponent(),
                fromLogMessageLevel(message.getLevel()),
                message.getPayload());
    }
Utility class for serialization of log requests and responses.

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