public static SplunkEventImpl fromLog(LogRecord lr) {

            ZonedDateTime eventTime = ZonedDateTime.ofInstant(
                    Instant.ofEpochMilli(lr.getMillis()),
                    ZoneOffset.UTC);

            //set fields
            Map<String, String> fields = new HashMap<>();
            fields.put(prefixedFieldName(KEY_TIME), ZonedDateTime.ofInstant(
                    Instant.ofEpochMilli(lr.getMillis()),
                    ZoneOffset.UTC).toString());
            fields.put(prefixedFieldName(KEY_LEVEL), lr.getLevel().getName());
            fields.put(prefixedFieldName(KEY_LOGGER), lr.getLoggerName());
            fields.put(prefixedFieldName(KEY_MSG), lr.getMessage());
            fields.put(prefixedFieldName(KEY_SOURCE), lr.getSourceClassName()
                    + CLASS_METHOD_SEPARATOR
                    + lr.getSourceMethodName());
            Throwable ex = lr.getThrown();
            if (ex != null) {
                fields.put(prefixedFieldName(KEY_EXCEPTION_CLASS),
                        ex.getClass().getName());

                if (ex.getMessage() != null && !ex.getMessage().isEmpty()) {
                    fields.put(prefixedFieldName(KEY_EXCEPTION_MSG),
                            ex.getMessage());
                }

                fields.put(prefixedFieldName(KEY_STACK),
                        exceptionStack(ex));
            }

            return new SplunkEventImpl(eventTime, fields);
        }