Ceylan LogMX Parser able to parse a log file with multi-line support and Relative Date support. More...
Public Member Functions | |
String | getParserName () |
Returns the name of this parser. | |
String | getSupportedFileType () |
Returns the supported file type for this parser. | |
Date | getRelativeEntryDate (ParsedEntry pEntry) throws Exception |
Returns the relative timestamp of given entry (if entry's ExtraInfo contains "1265", it means "T0 + 1265 ms", so simply return "new Date(1265)"). | |
Date | getAbsoluteEntryDate (ParsedEntry pEntry) throws Exception |
Returns the Date object for the given entry. | |
Protected Member Functions | |
void | parseLine (String line) throws Exception |
Process the new line of text read from file. | |
Private Attributes | |
ParsedEntry | entry = null |
Current parsed log entry. | |
Static Private Attributes | |
static final SimpleDateFormat | DatePattern |
Entry date format. | |
static final Pattern | TraceBeginPattern |
Pattern to match the beginning of a trace, like '<0.31.0>|': |
Ceylan LogMX Parser able to parse a log file with multi-line support and Relative Date support.
Here is an example of log file suitable for this parser: """ <0.32.0>|AnotherObject-18|Actor.AnotherObject|3168318240218|08/04/2008 04:41:24|mynode.machine.org|Simulation.Event.MyEvent|2|No answer from my object """
Definition at line 29 of file CeylanParser.java.
Date ceylan::parser::CeylanParser::getAbsoluteEntryDate | ( | ParsedEntry | pEntry | ) | throws Exception [inline] |
Returns the Date object for the given entry.
Definition at line 173 of file CeylanParser.java.
References DatePattern.
String ceylan::parser::CeylanParser::getParserName | ( | ) | [inline] |
Returns the name of this parser.
Definition at line 49 of file CeylanParser.java.
Date ceylan::parser::CeylanParser::getRelativeEntryDate | ( | ParsedEntry | pEntry | ) | throws Exception [inline] |
Returns the relative timestamp of given entry (if entry's ExtraInfo contains "1265", it means "T0 + 1265 ms", so simply return "new Date(1265)").
Definition at line 161 of file CeylanParser.java.
String ceylan::parser::CeylanParser::getSupportedFileType | ( | ) | [inline] |
Returns the supported file type for this parser.
Definition at line 59 of file CeylanParser.java.
void ceylan::parser::CeylanParser::parseLine | ( | String | line | ) | throws Exception [inline, protected] |
Process the new line of text read from file.
Definition at line 69 of file CeylanParser.java.
References entry, and TraceBeginPattern.
final SimpleDateFormat ceylan::parser::CeylanParser::DatePattern [static, private] |
new SimpleDateFormat( "dd/MM/yyyy HH:mm:ss" )
Entry date format.
Definition at line 37 of file CeylanParser.java.
Referenced by getAbsoluteEntryDate().
ParsedEntry ceylan::parser::CeylanParser::entry = null [private] |
Current parsed log entry.
Definition at line 33 of file CeylanParser.java.
Referenced by parseLine().
final Pattern ceylan::parser::CeylanParser::TraceBeginPattern [static, private] |
Pattern.compile("^<\\d++\\.\\d++\\.\\d++>\\|.*$")
Pattern to match the beginning of a trace, like '<0.31.0>|':
Definition at line 41 of file CeylanParser.java.
Referenced by parseLine().