@Test
  public void testDatePatternWithT() throws IOException, InitializationException, ParseException {
    Properties p = new Properties();
    // Mixing sequence on purpose to test that sequence does not matter.
    p.put("thrN.group", "4");
    p.put("seq.group", "2");
    p.put("TIMESTAMP.group", "1");
    p.put("THREAD.group", "3");
    p.put("type", "log4j");
    p.put("rePattern", "(\\S+) *\\| *(\\S+) *\\| *(\\S+) *\\| *(\\S+) *\\| *(\\S+) *\\| *(\\S+) *\\| *(.*)");
    p.put("dateFormat", "yyyy-MM-dd'T'HH:mm:ss.SSSZ");
    p.put("LEVEL.group", "5");
    p.put("CLASS.group", "6");
    p.put("MESSAGE.group", "7");

    Log4jPatternMultilineLogParser logParser = new Log4jPatternMultilineLogParser();
    InputStream in = loadLog("log4j/log4j_date_pattern_with_T.txt");
    LogImporterUsingParser importerUsingParser = new LogImporterUsingParser(logParser);
    ParsingContext context = new ParsingContext();
    importerUsingParser.init(p);
    importerUsingParser.initParsingContext(context);

    // when
    ProxyLogDataCollector dataCollector = new ProxyLogDataCollector();
    importerUsingParser.importLogs(in, dataCollector, context);

    // then
    LogData[] logDatas = dataCollector.getLogData();
    assertEquals(2, logDatas.length);
    assertEquals(Level.INFO, logDatas[0].getLevel());
    assertEquals("ENTRY something", logDatas[0].getMessage());
    assertEquals(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z").parse("2012-01-12 20:02:00.237 +0200").getTime(), logDatas[0].getDate().getTime());
    assertEquals("00002065", logDatas[0].getThread());
    assertEquals("MyClass", logDatas[0].getClazz());
    assertEquals("(8,617,481)", logDatas[0].getProperties().get("seq"));
    assertEquals("ThrN1", logDatas[0].getProperties().get("thrN"));

    assertEquals(Level.INFO, logDatas[1].getLevel());
    assertEquals("msg", logDatas[1].getMessage());
    assertEquals(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z").parse("2012-01-12 20:03:00.240 +0200").getTime(), logDatas[1].getDate().getTime());
    assertEquals("00002065", logDatas[1].getThread());
    assertEquals("MyClass", logDatas[1].getClazz());
    assertEquals("(8,617,482)", logDatas[1].getProperties().get("seq"));
    assertEquals("Thrn2", logDatas[1].getProperties().get("thrN"));

  }
This class tests the "rePattern" alternative of Log4jPatternMultilineLogParser.
(As opposed to the more simple "pattern" system).
olv-core/src/test/java/pl/otros/logview/parser/log4j/Log4jPatternRegexParserTest.java