WEB4J Development Tools 4.10.0.0

hirondelle.web4jtools.logview.parser
Class LogParserForJDKDefault

Object
  extended by hirondelle.web4jtools.logview.parser.LogParserForJDKDefault
All Implemented Interfaces:
LogParser

final class LogParserForJDKDefault
extends Object
implements LogParser

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

DATE_FORMAT

public static final String DATE_FORMAT
The assumed date format for logging output - "d-MMM-yyyy h:mm:ss a". You may need to change this to reflect your host's settings.

See Also:
Constant Field Values
Constructor Detail

LogParserForJDKDefault

LogParserForJDKDefault()
Method Detail

parse

public List<LoggerRecord> parse(String aLogFileContents,
                                ParsedCriteria aCriteria)
Description copied from interface: LogParser
Parse the contents of a log file into 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.

Specified by:
parse in interface LogParser

WEB4J Development Tools 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26