Package org.apache.log4j.lf5.util
Class LogFileParser
- java.lang.Object
-
- org.apache.log4j.lf5.util.LogFileParser
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_DELIMITERstatic StringCATEGORY_DELIMITERstatic StringDATE_DELIMITERstatic StringLOCATION_DELIMITERstatic StringMESSAGE_DELIMITERstatic StringNDC_DELIMITERstatic StringPRIORITY_DELIMITERstatic StringRECORD_DELIMITERstatic StringTHREAD_DELIMITER
-
Constructor Summary
Constructors Constructor Description LogFileParser(File file)LogFileParser(InputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddisplayError(String message)voidparse(LogBrokerMonitor monitor)Starts a new thread to parse the log file and create a LogRecord.voidrun()Parses the file and creates new log records and adds the record to the monitor.
-
-
-
Field Detail
-
RECORD_DELIMITER
public static final String RECORD_DELIMITER
- See Also:
- Constant Field Values
-
ATTRIBUTE_DELIMITER
public static final String ATTRIBUTE_DELIMITER
- See Also:
- Constant Field Values
-
DATE_DELIMITER
public static final String DATE_DELIMITER
- See Also:
- Constant Field Values
-
THREAD_DELIMITER
public static final String THREAD_DELIMITER
- See Also:
- Constant Field Values
-
CATEGORY_DELIMITER
public static final String CATEGORY_DELIMITER
- See Also:
- Constant Field Values
-
LOCATION_DELIMITER
public static final String LOCATION_DELIMITER
- See Also:
- Constant Field Values
-
MESSAGE_DELIMITER
public static final String MESSAGE_DELIMITER
- See Also:
- Constant Field Values
-
PRIORITY_DELIMITER
public static final String PRIORITY_DELIMITER
- See Also:
- Constant Field Values
-
NDC_DELIMITER
public static final String NDC_DELIMITER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogFileParser
public LogFileParser(File file) throws IOException, FileNotFoundException
- Throws:
IOExceptionFileNotFoundException
-
LogFileParser
public LogFileParser(InputStream stream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
parse
public void parse(LogBrokerMonitor monitor) throws RuntimeException
Starts a new thread to parse the log file and create a LogRecord. See run().- Parameters:
monitor- LogBrokerMonitor- Throws:
RuntimeException
-
run
public void run()
Parses the file and creates new log records and adds the record to the monitor.
-
displayError
protected void displayError(String message)
-
-