I tried to use discovery feature, I am not sure that I used it in the correct way, but the method always returned the exact input string. I'll be thankful if you guide how I should use it. Please consider a simple test in the following, the out variable will be 1234 in this test.
@Test
public void dtest() {
try {
Grok g = Grok.create(ResourceManager.PATTERNS);
Discovery disc = new Discovery(g);
final String out = disc.discover("1234");
System.out.println("discovered type=" + out);
} catch (GrokException ex) {
Logger.getLogger(DiscoveryTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
I tried to use discovery feature, I am not sure that I used it in the correct way, but the method always returned the exact input string. I'll be thankful if you guide how I should use it. Please consider a simple test in the following, the out variable will be 1234 in this test.