public class XLogFilter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ALLOW_ALL_REGEX |
static String |
MAX_ACTIONLIST_SCAN_DURATION |
static String |
MAX_SCAN_DURATION |
Constructor and Description |
---|
XLogFilter() |
XLogFilter(XLogUserFilterParam userLogFilter) |
Modifier and Type | Method and Description |
---|---|
Date |
adjustOffset(Date date,
int offset)
Adjust offset, offset will always be in min.
|
void |
calculateAndValidateDateRange(Date jobStartTime,
Date jobEndTime)
Calculate and validate date range.
|
void |
constructPattern()
Constructs the regular expression according to the filter and assigns it to fileterPattarn.
|
static void |
defineParameter(String filterParam) |
String |
getDebugMessage() |
Date |
getEndDate() |
Map<String,String> |
getFilterParams() |
String |
getFormattedEndDate() |
String |
getFormattedStartDate() |
int |
getLogLimit() |
Date |
getStartDate() |
XLogUserFilterParam |
getUserLogFilter() |
boolean |
isActionList() |
boolean |
isDebugMode() |
boolean |
isFilterPresent() |
boolean |
matches(ArrayList<String> logParts)
Checks if the logLevel and logMessage goes through the logFilter.
|
static void |
reset() |
void |
setActionList(boolean isActionList) |
void |
setLogLevel(String logLevel) |
void |
setParameter(String filterParam,
String value) |
void |
setUserLogFilter(XLogUserFilterParam userLogFilter) |
ArrayList<String> |
splitLogMessage(String logLine)
Splits the log line into timestamp, logLevel and remaining log message.
|
public static String MAX_ACTIONLIST_SCAN_DURATION
public static String MAX_SCAN_DURATION
public static final String ALLOW_ALL_REGEX
public XLogFilter()
public XLogFilter(XLogUserFilterParam userLogFilter)
public void setLogLevel(String logLevel)
public void setParameter(String filterParam, String value)
public static void defineParameter(String filterParam)
public boolean isFilterPresent()
public boolean matches(ArrayList<String> logParts)
logParts
- public ArrayList<String> splitLogMessage(String logLine)
logLine
- public void constructPattern()
public static void reset()
public final Map<String,String> getFilterParams()
public XLogUserFilterParam getUserLogFilter()
public void setUserLogFilter(XLogUserFilterParam userLogFilter)
public Date getEndDate()
public String getFormattedEndDate()
public String getFormattedStartDate()
public Date getStartDate()
public boolean isDebugMode()
public int getLogLimit()
public String getDebugMessage()
public boolean isActionList()
public void setActionList(boolean isActionList)
public void calculateAndValidateDateRange(Date jobStartTime, Date jobEndTime) throws IOException
jobStartTime
- the job start timejobEndTime
- the job end timeIOException
- Signals that an I/O exception has occurred.public Date adjustOffset(Date date, int offset) throws IOException
date
- the dateoffset
- the offsetIOException
- Signals that an I/O exception has occurred.Copyright © 2014 Apache Software Foundation. All Rights Reserved.