|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.logging.LogLineFormat
org.jcoderz.commons.logging.BasicLogLineFormat
org.jcoderz.commons.logging.TraceLineFormat
public class TraceLineFormat
This formats a standard LogRecord and parses a log line with a formatted log record.
| 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.BasicLogLineFormat |
|---|
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 | |
|---|---|
protected |
TraceLineFormat(LogLineFormat.LogLineType type)
Creates a new instance of this and sets the supplied line type specifier. |
| Method Summary | |
|---|---|
void |
format(StringBuffer sb,
LogRecord record,
Loggable loggable,
List trackingIdSequence,
Throwable thrown,
Object parameter)
Formats the supplied LogRecord with the encapsulated message format. |
protected String[] |
getLogSource()
Gets the source class name and source method name where the Log record was logged of a parsed log line. |
protected String |
getMessageText()
Gets the message text of a parsed log line. |
void |
parse(StringBuffer sb,
LogFileEntry entry)
Parses a log line, which must be formatted by this, and sets the appropriate values of the supplied LogFileEntry. |
protected void |
setLogSource(String clazz,
String method)
Sets the log source as classname.methodname() |
protected void |
setMessageText(String text)
Sets the message to format. |
| Methods inherited from class org.jcoderz.commons.logging.BasicLogLineFormat |
|---|
basicFormat, basicParse, getBasicFormatList, getBusinessImpact, getCategory, getInstanceId, getLevel, getMessageId, getNodeId, getThreadId, getThreadName, getTimestamp, getTrackingIds, setBusinessImpact, setCategory, setInstanceId, setLevel, setMessageId, setNodeId, setThreadId, setThreadName, setTimestamp, 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 |
|---|
protected TraceLineFormat(LogLineFormat.LogLineType type)
type - The LineTypeSpecifier to set.| Method Detail |
|---|
public void format(StringBuffer sb,
LogRecord record,
Loggable loggable,
List trackingIdSequence,
Throwable thrown,
Object parameter)
format in class LogLineFormatsb - The StringBuffer where to append the formatted LogRecord.record - The LogRecord to format.loggable - Unused by this, might be null.trackingIdSequence - The list containing the sequence of tracking
ids contributing to this log message.thrown - Unused by this, might be null.parameter - Unused by this, might be null.LogLineFormat.format(StringBuffer, LogRecord, Loggable, List, Throwable, Object)
public void parse(StringBuffer sb,
LogFileEntry entry)
throws ParseException
parse in class LogLineFormatsb - The StringBuffer containing the current log line.entry - The LogFileEntry for which to parse the log line.
ParseException - if an error occurs.LogLineFormat.parse(StringBuffer, LogFileEntry)protected final void setMessageText(String text)
text - The message text.protected final String getMessageText()
protected final void setLogSource(String clazz,
String method)
clazz - The name of the class.method - The name of the method.protected final String[] getLogSource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||