public abstract class MultiLineLogEntryProcessor extends Object implements LogEntryProcessor
LogEntryProcessor for multi-line log files - provides several abstract methods that subclasses must
implement.| Modifier and Type | Class and Description |
|---|---|
protected static class |
MultiLineLogEntryProcessor.LogEntry |
protected static class |
MultiLineLogEntryProcessor.ParseException |
| Modifier and Type | Field and Description |
|---|---|
protected DateFormat |
dateFormat |
protected String |
eventType |
protected Pattern |
includesPattern |
protected org.apache.commons.logging.Log |
log |
protected File |
logFile |
protected org.rhq.core.domain.event.EventSeverity |
minimumSeverity |
| Constructor and Description |
|---|
MultiLineLogEntryProcessor(String eventType,
File logFile) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract DateFormat |
getDefaultDateFormat() |
protected abstract Pattern |
getPattern() |
protected Date |
parseDateString(String dateString) |
protected MultiLineLogEntryProcessor.LogEntry |
processLine(String line,
Set<org.rhq.core.domain.event.Event> events,
MultiLineLogEntryProcessor.LogEntry currentEntry) |
Set<org.rhq.core.domain.event.Event> |
processLines(BufferedReader bufferedReader)
Processes the specified lines from a log file, and returns a set of Events if appropriate, or otherwise, null.
|
protected abstract MultiLineLogEntryProcessor.LogEntry |
processPrimaryLine(Matcher matcher) |
void |
setDateFormat(DateFormat dateFormat) |
protected static void |
setDateIfNotSet(Date timestamp) |
void |
setIncludesPattern(Pattern includesPattern) |
void |
setMinimumSeverity(org.rhq.core.domain.event.EventSeverity minimumSeverity) |
protected final org.apache.commons.logging.Log log
protected String eventType
protected File logFile
protected org.rhq.core.domain.event.EventSeverity minimumSeverity
protected Pattern includesPattern
protected DateFormat dateFormat
@Nullable public Set<org.rhq.core.domain.event.Event> processLines(BufferedReader bufferedReader) throws IOException
LogEntryProcessorprocessLines in interface LogEntryProcessorbufferedReader - a buffered reader from which the lines can be readIOException - if reading lines from the supplied buffer reader failspublic void setMinimumSeverity(org.rhq.core.domain.event.EventSeverity minimumSeverity)
public void setIncludesPattern(Pattern includesPattern)
public void setDateFormat(DateFormat dateFormat)
protected MultiLineLogEntryProcessor.LogEntry processLine(String line, Set<org.rhq.core.domain.event.Event> events, MultiLineLogEntryProcessor.LogEntry currentEntry)
protected abstract Pattern getPattern()
protected abstract MultiLineLogEntryProcessor.LogEntry processPrimaryLine(Matcher matcher) throws MultiLineLogEntryProcessor.ParseException
protected abstract DateFormat getDefaultDateFormat()
protected Date parseDateString(String dateString) throws MultiLineLogEntryProcessor.ParseException
protected static void setDateIfNotSet(Date timestamp)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.