|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objecthirondelle.web4jtools.logview.parser.LogParserForJDKDefault
final class LogParserForJDKDefault
Parse a JDK log file having default format.
Example of a typical log record :
16-Sep-2011 9:00:28 PM hirondelle.web4j.webmaster.LoggingConfigImpl tryTestMessages FINE: This is a test message for Logger 'hirondelle.web4jtools'The above record is parsed by this class into the following parts :
The message is often over multiple lines.
There is no specific delimiter for this format, so this implementation uses an ad hoc method of delimiting records.
Note that this class is package-private, to prevent it from being used directly by
other packages. The caller uses
LogParserInstance
to obtain instances of
this class.
Field Summary | |
---|---|
static String |
DATE_FORMAT
The assumed date format for logging output - "d-MMM-yyyy h:mm:ss a". |
Constructor Summary | |
---|---|
LogParserForJDKDefault()
|
Method Summary | |
---|---|
List<LoggerRecord> |
parse(String aLogFileContents,
ParsedCriteria aCriteria)
Parse the contents of a log file into LoggerRecord objects. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DATE_FORMAT
Constructor Detail |
---|
LogParserForJDKDefault()
Method Detail |
---|
public List<LoggerRecord> parse(String aLogFileContents, ParsedCriteria aCriteria)
LogParser
LoggerRecord
objects.
Design Note
This interface does not use streams. Streams would likely be more
performant in handling large files. However, since this tool is meant as
a development tool, and not for production (because of
security concerns), this is usually acceptable, since during development
log files rarely become excessively large.
parse
in interface LogParser
|
WEB4J Development Tools 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |