Package oi.thekraken.grok.api

Examples of oi.thekraken.grok.api.Grok.addPattern()


  @Test
  public void test004_sameExpantedPatern() throws GrokException {
    Grok g = Grok.create("patterns/patterns");

    g.addPattern("test", "hello world");
    g.compile("%{test}");
    assertEquals("(?<name0>hello world)", g.getNamedRegex());
  }

  @Test
View Full Code Here


    assertTrue(thrown);

    thrown = false;

    try {
      g.addPattern(null, "");
    } catch (GrokException e) {
      thrown = true;
    }
    assertTrue(thrown);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.