private static Instant parseTimestamp(String timeStr) throws InvalidLogFormatException {
        try {
            int decimalSeparator = timeStr.indexOf('.');
            if (decimalSeparator == -1) {
                return Instant.ofEpochSecond(Long.parseLong(timeStr));
            }
            long seconds = Long.parseLong(timeStr.substring(0, decimalSeparator));
            long nanoseconds = Long.parseLong(String.format("%1$-9s", timeStr.substring(decimalSeparator + 1)).replace(' ', '0')); // right pad with zeros
            return Instant.ofEpochSecond(seconds, nanoseconds);
        } catch (NumberFormatException e) {
            throw new InvalidLogFormatException(String.format("Failed to parse timestamp: %s. Timestamp string: '%s'", e.getMessage(), timeStr), e);
        }
    }
Make a log message from the native format of the logging
package.

@param msg The log message
@return Returns a LogMessage instance
@throws InvalidLogFormatException if the log message
   can not be parsed, ie. is invalid, we throw this
   exception.
vespalog/src/main/java/com/yahoo/log/LogMessage.java