|
||||||||||
| 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
public abstract class BasicLogLineFormat
This class is the base class for log formats formatting the main log line of the log message, which contains all fields required for CA Unicenter integration. All sub classes of this are required to use these fields at the index required by this, but are allowed to append additional fields.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jcoderz.commons.logging.LogLineFormat |
|---|
LogLineFormat.LogLineType |
| Field Summary | |
|---|---|
protected static int |
NUMBER_OF_PARAMETERS
The number of parameters of the basic format. |
| 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 |
BasicLogLineFormat(LogLineFormat.LogLineType type,
String additionalPattern,
int numAdditionalParameters)
Creates a new instance of this and initializes the message format. |
| Method Summary | |
|---|---|
protected void |
basicFormat(StringBuffer sb,
LogRecord record,
Loggable loggable,
List trackingIdSequence)
Formats the supplied LogRecord with the encapsulated basic message format. |
protected void |
basicParse(StringBuffer sb,
LogFileEntry entry)
Parses a log line, which must be formatted by this, and sets the appropriate basic values of the supplied LogFileEntry. |
protected static List |
getBasicFormatList(DisplayOptions options,
boolean ignoreOptions)
Gets the formats as array for formatting all elements of a basic log line. |
protected BusinessImpact |
getBusinessImpact()
Gets the business impact of a parsed log line. |
protected Category |
getCategory()
Gets the category of a parsed log line. |
protected String |
getInstanceId()
Gets the instance id of a parsed log line. |
protected Level |
getLevel()
Gets the log level of a parsed log line. |
protected String |
getMessageId()
Gets the message id of a parsed log line. |
protected String |
getNodeId()
Gets the node id of a parsed log line. |
protected long |
getThreadId()
Gets the thread id of a parsed log line. |
protected String |
getThreadName()
Gets the thread id of a parsed log line. |
protected Date |
getTimestamp()
Gets the timestamp of a parsed log line. |
protected List |
getTrackingIds()
Gets the sequence of tracking ids of a parsed log line. |
protected void |
setBusinessImpact(BusinessImpact impact)
Sets the business impact from the message to dump. |
protected void |
setCategory(Category category)
Sets the category to dump. |
protected void |
setInstanceId(String instanceId)
Sets the instance id to dump. |
protected void |
setLevel(Level level)
Sets the level of the message to dump, |
protected void |
setMessageId(String messageId)
Sets the message id from the message to dump. |
protected void |
setNodeId(String nodeId)
Sets the node id to dump. |
protected void |
setThreadId(long threadId)
Sets the thread id from the message to dump. |
protected void |
setThreadName(String threadName)
Sets the thread name from the message to dump. |
protected void |
setTimestamp(Date timestamp)
Sets the timestamp. |
protected void |
setTrackingIds(List trackingIds)
Sets the list of tracking ids to dump. |
| Methods inherited from class org.jcoderz.commons.logging.LogLineFormat |
|---|
format, format, getBusinessImpactFormat, getCategoryFormat, getInstanceIdFormat, getLoggerLevelFormat, getLogLineType, getLogSource, getMessageSymbolFormat, getNodeIdFormat, getParameter, getThreadIdFormat, getThreadNameFormat, getTimestampFormat, getTrackingNumberFormat, parse, parse, setFormats, setParameter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int NUMBER_OF_PARAMETERS
| Constructor Detail |
|---|
protected BasicLogLineFormat(LogLineFormat.LogLineType type,
String additionalPattern,
int numAdditionalParameters)
type - THe log line type.additionalPattern - The pattern for additional fields not included by
this. Must start with the desired delimiter before the first field.numAdditionalParameters - The number of additional fields.| Method Detail |
|---|
protected static List getBasicFormatList(DisplayOptions options,
boolean ignoreOptions)
options - The display options specifying which fields to display.
Will be ignored and might be null if ignoreOptions == true.ignoreOptions - flag whether to ignore the supplied options and
return the formats for all fields.
protected final void basicFormat(StringBuffer sb,
LogRecord record,
Loggable loggable,
List trackingIdSequence)
sb - 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.
protected final void basicParse(StringBuffer sb,
LogFileEntry entry)
throws ParseException
sb - The StringBuffer containing the current log line.entry - The LogFileEntry for which to parse the log line.
ParseException - if an error occurs parsing sb.LogLineFormat.parse(java.lang.StringBuffer, org.jcoderz.commons.logging.LogFileEntry)protected final void setTimestamp(Date timestamp)
timestamp - The timestamp to set.protected final Date getTimestamp()
protected final void setNodeId(String nodeId)
nodeId - The node id to dump.protected final String getNodeId()
protected final void setInstanceId(String instanceId)
instanceId - The instance id to dump.protected final String getInstanceId()
protected final void setThreadId(long threadId)
threadId - The thread id to dump.protected final long getThreadId()
protected final void setThreadName(String threadName)
threadName - The thread name to dump.protected final String getThreadName()
protected final void setTrackingIds(List trackingIds)
trackingIds - The sequence of tracking ids to dump.protected final List getTrackingIds()
protected final void setLevel(Level level)
level - The log level of the message.protected final Level getLevel()
protected final void setMessageId(String messageId)
messageId - The message id of the message.protected final String getMessageId()
protected final void setBusinessImpact(BusinessImpact impact)
impact - The business impact of the message.protected final BusinessImpact getBusinessImpact()
protected final void setCategory(Category category)
category - The category of the message to dump.protected final Category getCategory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||