ceylan::parser::CeylanParser Class Reference

Ceylan LogMX Parser able to parse a log file with multi-line support and Relative Date support. More...

Inheritance diagram for ceylan::parser::CeylanParser:
Inheritance graph
[legend]
Collaboration diagram for ceylan::parser::CeylanParser:
Collaboration graph
[legend]

List of all members.

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>|':

Detailed Description

Ceylan LogMX Parser able to parse a log file with multi-line support and Relative Date support.

See also:
Ceylan traces

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 """

See also:
TraceSample.txt

Definition at line 29 of file CeylanParser.java.


Member Function Documentation

Date ceylan::parser::CeylanParser::getAbsoluteEntryDate ( ParsedEntry  pEntry  )  throws Exception [inline]

Returns the Date object for the given entry.

See also:
com.lightysoft.logmx.mgr.LogFileParser, getAbsoluteEntryDate(com.lightysoft.logmx.business.ParsedEntry)

Definition at line 173 of file CeylanParser.java.

References DatePattern.

String ceylan::parser::CeylanParser::getParserName (  )  [inline]

Returns the name of this parser.

See also:
com.lightysoft.logmx.mgr.LogFileParser::getParserName()

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)").

See also:
com.lightysoft.logmx.mgr.LogFileParser, getRelativeEntryDate(com.lightysoft.logmx.business.ParsedEntry)

Definition at line 161 of file CeylanParser.java.

String ceylan::parser::CeylanParser::getSupportedFileType (  )  [inline]

Returns the supported file type for this parser.

See also:
com.lightysoft.logmx.mgr.LogFileParser::getSupportedFileType()

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.

See also:
com.lightysoft.logmx.mgr.LogFileParser::parseLine(java.lang.String)

Definition at line 69 of file CeylanParser.java.

References entry, and TraceBeginPattern.


Member Data Documentation

final SimpleDateFormat ceylan::parser::CeylanParser::DatePattern [static, private]
Initial value:
 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]
Initial value:
        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().


The documentation for this class was generated from the following file:
Generated on Mon Nov 29 13:42:01 2010 for Ceylan by  doxygen 1.6.3