private LoggingEvent buildEvent(ParsingContext ctx) {
    HashMap<String, Object> logEventParsingProperitesMap = (HashMap<String, Object>) ctx.getCustomConextProperties().get(PROPERTY_LOG_EVENT_PROPERTIES);
    if (logEventParsingProperitesMap.size() == 0) {
      String[] additionalLines = ctx.getUnmatchedLog().toString().split("\n");
      for (String line : additionalLines) {
        LOG.finest(String.format("found non-matching (file %s) line: \"%s\"", ctx.getLogSource(), line));
      }
      ctx.getUnmatchedLog().setLength(0);
      return null;
    }
    // the current map contains fields - build an event
    int exceptionLine = getExceptionLine(ctx);
    String[] exception = buildException(exceptionLine, ctx);
    String[] additionalLines = ctx.getUnmatchedLog().toString().split("\n");
    // messages are listed before exceptions in additional lines
    if (additionalLines.length > 0 && exception.length > 0) {
      logEventParsingProperitesMap.put(MESSAGE, buildMessage((String) logEventParsingProperitesMap.get(MESSAGE), exceptionLine, ctx));
    }
    DateFormat dateFormat = ctx.getDateFormat();
    LoggingEvent event = convertToEvent(logEventParsingProperitesMap, exception, dateFormat);

    logEventParsingProperitesMap.clear();
    ctx.getUnmatchedLog().setLength(0);
    return event;
  }
Construct a logging event from currentMap and additionalLines (additionalLines contains multiple message lines and any exception lines)
<p>
CurrentMap and additionalLines are cleared in the process

@return event
olv-core/src/main/java/pl/otros/logview/parser/log4j/Log4jPatternMultilineLogParser.java