org.jcoderz.commons.logging
Class NestedLineFormat
java.lang.Object
org.jcoderz.commons.logging.LogLineFormat
org.jcoderz.commons.logging.ContinuationLineFormat
org.jcoderz.commons.logging.NestedLineFormat
public final class NestedLineFormat
- extends ContinuationLineFormat
Formats and parses log lines for nested messages.
|
Constructor Summary |
NestedLineFormat()
Creates a new instance of this and initializes the message format. |
| Methods inherited from class org.jcoderz.commons.logging.LogLineFormat |
format, getBusinessImpactFormat, getCategoryFormat, getInstanceIdFormat, getLoggerLevelFormat, getLogLineType, getLogSource, getMessageSymbolFormat, getNodeIdFormat, getParameter, getThreadIdFormat, getThreadNameFormat, getTimestampFormat, getTrackingNumberFormat, parse, setFormats, setParameter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NestedLineFormat
public NestedLineFormat()
- Creates a new instance of this and initializes the message format.
format
public void format(StringBuffer sb,
LogRecord record,
Loggable loggable,
List trackingIdSequence,
Throwable thrown,
Object parameter)
- Formats either a LogRecord or a Loggable as nested message.
Append a line feed after the data has been formatted into the
StringBuffer.
- Specified by:
format in class LogLineFormat
- Parameters:
sb - The StringBuffer where to append the formatted data.record - The LogRecord to format, if loggable is not
null, this is unused and might be null.loggable - The Loggable to format, might be null, but then
record must not be null.trackingIdSequence - The sequence of contributing tracking ids.thrown - Unused, might be null.parameter - Gives the cause of the message on top of this and is
the message text to be formatted by this.
parse
public void parse(StringBuffer sb,
LogFileEntry entry)
throws ParseException
- The common interface for all log line formatters. A log line is parsed
and the data being retrieved is set within the supplied LogFileEntry.
- Specified by:
parse in class LogLineFormat
- Parameters:
sb - The StringBuffer containing the log line to parse from the
current position to the end.entry - The LogFileEntry which gets the data being parsed.
- Throws:
ParseException - if an error occurs parsing the log line.
Copyright 2007 The jCoderZ Project.