org.rhq.core.pluginapi.event.log
Class Log4JLogEntryProcessor
java.lang.Object
org.rhq.core.pluginapi.event.log.MultiLineLogEntryProcessor
org.rhq.core.pluginapi.event.log.Log4JLogEntryProcessor
- All Implemented Interfaces:
- LogEntryProcessor
public class Log4JLogEntryProcessor
- extends MultiLineLogEntryProcessor
A 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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4JLogEntryProcessor
public Log4JLogEntryProcessor(String eventType,
File logFile)
getPattern
protected Pattern getPattern()
- Specified by:
getPattern in class MultiLineLogEntryProcessor
processPrimaryLine
protected MultiLineLogEntryProcessor.LogEntry processPrimaryLine(Matcher matcher)
throws MultiLineLogEntryProcessor.ParseException
- Specified by:
processPrimaryLine in class MultiLineLogEntryProcessor
- Throws:
MultiLineLogEntryProcessor.ParseException
getDefaultDateFormat
protected DateFormat getDefaultDateFormat()
- Specified by:
getDefaultDateFormat in class MultiLineLogEntryProcessor
parseDateString
protected Date parseDateString(String dateString)
throws MultiLineLogEntryProcessor.ParseException
- Overrides:
parseDateString in class MultiLineLogEntryProcessor
- Throws:
MultiLineLogEntryProcessor.ParseException
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.