org.jcoderz.commons.logging
Class ParameterLineFormat

java.lang.Object
  extended by org.jcoderz.commons.logging.LogLineFormat
      extended by org.jcoderz.commons.logging.ContinuationLineFormat
          extended by org.jcoderz.commons.logging.ParameterLineFormat

public class ParameterLineFormat
extends ContinuationLineFormat

This class is used for formatting the parameters of a Loggable and parsing one parameter log line.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jcoderz.commons.logging.LogLineFormat
LogLineFormat.LogLineType
 
Field Summary
 
Fields inherited from class org.jcoderz.commons.logging.ContinuationLineFormat
NUMBER_OF_PARAMETERS
 
Fields inherited from class org.jcoderz.commons.logging.LogLineFormat
EMPTY_FORMATTERS, ERROR_MESSAGE, EXCEPTION_MESSAGE, LOG_MESSAGE, NESTED_MESSAGE, PARAMETER_LINE, SOURCECLASS_INDEX, SOURCEMETHOD_INDEX, STACKTRACE_MESSAGE, TRACE_MESSAGE
 
Constructor Summary
ParameterLineFormat()
          Creates a new instance of this and initializes the message format.
 
Method Summary
 void format(StringBuffer sb, LogRecord record, Loggable loggable, List trackingIdSequence, Throwable thrown, Object parameter)
          Formats the parameters of a Loggable.
 void parse(StringBuffer sb, LogFileEntry entry)
          Parses one line of log data and sets the data in the supplied LogFileEntry.
 
Methods inherited from class org.jcoderz.commons.logging.ContinuationLineFormat
basicFormat, basicParse, getBasicFormatList, getThreadId, getTrackingIds, setThreadId, setTrackingIds
 
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
 

Constructor Detail

ParameterLineFormat

public ParameterLineFormat()
Creates a new instance of this and initializes the message format.

Method Detail

format

public void format(StringBuffer sb,
                   LogRecord record,
                   Loggable loggable,
                   List trackingIdSequence,
                   Throwable thrown,
                   Object parameter)
Formats the parameters of a Loggable. Always adds the log location and log message symbal as first parameters. This will format several lines into the StringBuffer. 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 - Unused, might be null.
loggable - The Loggable to format.
trackingIdSequence - The sequence of contributing tracking ids.
thrown - Unused, might be null.
parameter - Unused, might be null.

parse

public void parse(StringBuffer sb,
                  LogFileEntry entry)
           throws ParseException
Parses one line of log data and sets the data in 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.