use of org.apache.oozie.util.XLogUserFilterParam in project oozie by apache.
the class TestXLogUserFilterParam method testloglevel_DEBUF_INFO.
// Test multiple log level
public void testloglevel_DEBUF_INFO() throws Exception {
setLogFile();
String logLevel = XLogUserFilterParam.LOG_LEVEL + "=DEBUG|INFO";
Map<String, String[]> paramMap = new HashMap<String, String[]>();
paramMap.put(RestConstants.LOG_FILTER_OPTION, new String[] { logLevel });
XLogFilter xf = new XLogFilter(new XLogUserFilterParam(paramMap));
String out = doStreamLog(xf);
String[] lines = out.split(System.getProperty("line.separator"));
assertEquals(lines.length, 4);
assertTrue(lines[1].startsWith("2014-02-27 02:06:49,215 DEBUG CoordActionStartXCommand:545 [pool-2-thread-236] - USER[-] GROUP[-] " + "TOKEN[-] APP[-]"));
assertTrue(lines[2].startsWith("2014-02-27 02:06:49,215 DEBUG CoordActionStartXCommand:545 [pool-2-thread-236] - USER[-] GROUP[-] " + "TOKEN[-] APP[-] JOB[0601839-140127221758655-oozie-wrkf-C]"));
assertTrue(lines[3].startsWith("2014-02-27 02:06:49,215 INFO CoordActionStartXCommand:545 [pool-2-thread-236] - USER[-] GROUP[-] " + "TOKEN[-] APP[-] JOB[0601839-140127221758655-oozie-wrkf-C]"));
}
Aggregations