org.apache.oozie.util
Class XLogStreamer.Filter
java.lang.Object
org.apache.oozie.util.XLogStreamer.Filter
- Enclosing class:
- XLogStreamer
public static class XLogStreamer.Filter
- extends Object
Filter that will construct the regular expression that will be used to filter the log statement. And also checks
if the given log message go through the filter. Filters that can be used are logLevel(Multi values separated by
"|") jobId appName actionId token
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALLOW_ALL_REGEX
public static final String ALLOW_ALL_REGEX
- See Also:
- Constant Field Values
XLogStreamer.Filter
public XLogStreamer.Filter()
setLogLevel
public void setLogLevel(String logLevel)
setParameter
public void setParameter(String filterParam,
String value)
defineParameter
public static void defineParameter(String filterParam)
isFilterPresent
public boolean isFilterPresent()
matches
public boolean matches(ArrayList<String> logParts)
- Checks if the logLevel and logMessage goes through the logFilter.
- Parameters:
logParts
-
- Returns:
splitLogMessage
public ArrayList<String> splitLogMessage(String logLine)
- Splits the log line into timestamp, logLevel and remaining log message. Returns array containing logLevel and
logMessage if the pattern matches i.e A new log statement, else returns null.
- Parameters:
logLine
-
- Returns:
- Array containing log level and log message
constructPattern
public void constructPattern()
- Constructs the regular expression according to the filter and assigns it to fileterPattarn. ".*" will be
assigned if no filters are set.
reset
public static void reset()
Copyright © 2013 Apache Software Foundation. All Rights Reserved.