public class

LogFileParser

extends Object
implements Runnable
java.lang.Object
   ↳ org.apache.log4j.lf5.util.LogFileParser

Class Overview

Provides utility methods for input and output streams.

Summary

Constants
String ATTRIBUTE_DELIMITER
String CATEGORY_DELIMITER
String DATE_DELIMITER
String LOCATION_DELIMITER
String MESSAGE_DELIMITER
String NDC_DELIMITER
String PRIORITY_DELIMITER
String RECORD_DELIMITER
String THREAD_DELIMITER
Public Constructors
LogFileParser(File file)
LogFileParser(InputStream stream)
Public Methods
void parse(LogBrokerMonitor monitor)
Starts a new thread to parse the log file and create a LogRecord.
void run()
Parses the file and creates new log records and adds the record to the monitor.
Protected Methods
void displayError(String message)
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Runnable

Constants

public static final String ATTRIBUTE_DELIMITER

Constant Value: "[slf5s."

public static final String CATEGORY_DELIMITER

Constant Value: "[slf5s.CATEGORY]"

public static final String DATE_DELIMITER

Constant Value: "[slf5s.DATE]"

public static final String LOCATION_DELIMITER

Constant Value: "[slf5s.LOCATION]"

public static final String MESSAGE_DELIMITER

Constant Value: "[slf5s.MESSAGE]"

public static final String NDC_DELIMITER

Constant Value: "[slf5s.NDC]"

public static final String PRIORITY_DELIMITER

Constant Value: "[slf5s.PRIORITY]"

public static final String RECORD_DELIMITER

Constant Value: "[slf5s.start]"

public static final String THREAD_DELIMITER

Constant Value: "[slf5s.THREAD]"

Public Constructors

public LogFileParser (File file)

Throws
FileNotFoundException
IOException

public LogFileParser (InputStream stream)

Throws
IOException

Public Methods

public void parse (LogBrokerMonitor monitor)

Starts a new thread to parse the log file and create a LogRecord. See run().

Parameters
monitor LogBrokerMonitor
Throws
RuntimeException

public void run ()

Parses the file and creates new log records and adds the record to the monitor.

Protected Methods

protected void displayError (String message)