public class Log4JLogEntryProcessor extends MultiLineLogEntryProcessor
LogEntryProcessor for Log4J log files.
By default we support log entries of the format: date [delimiter]severity[delimiter] message Where: - the optional delimiters are either square brackets ort parens, with or without spaces - the date format is one of the built-ins below, or a user-specified date format for the logfile source - the message portion may contain multiple lines. For example: 2007-12-21 15:32:49,514 DEBUG [com.example.FooBar] run: IdleRemover notifying pools, interval: 450000 2007/12/21 15:32:49,514 (DEBUG) [com.example.FooBar] run: IdleRemover notifying pools, interval: 450000 2007-Dec-21 15:32:49 [ DEBUG ] [com.example.FooBar] run: IdleRemover notifying pools, interval: 450000
MultiLineLogEntryProcessor.LogEntry, MultiLineLogEntryProcessor.ParseExceptiondateFormat, eventType, includesPattern, log, logFile, minimumSeverity| Constructor and Description |
|---|
Log4JLogEntryProcessor(String eventType,
File logFile) |
| Modifier and Type | Method and Description |
|---|---|
protected DateFormat |
getDefaultDateFormat() |
protected Pattern |
getPattern() |
protected Date |
parseDateString(String dateString) |
protected MultiLineLogEntryProcessor.LogEntry |
processPrimaryLine(Matcher matcher) |
processLine, processLines, setDateFormat, setDateIfNotSet, setIncludesPattern, setMinimumSeverityprotected Pattern getPattern()
getPattern in class MultiLineLogEntryProcessorprotected MultiLineLogEntryProcessor.LogEntry processPrimaryLine(Matcher matcher) throws MultiLineLogEntryProcessor.ParseException
processPrimaryLine in class MultiLineLogEntryProcessorMultiLineLogEntryProcessor.ParseExceptionprotected DateFormat getDefaultDateFormat()
getDefaultDateFormat in class MultiLineLogEntryProcessorprotected Date parseDateString(String dateString) throws MultiLineLogEntryProcessor.ParseException
parseDateString in class MultiLineLogEntryProcessorMultiLineLogEntryProcessor.ParseExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.