|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.tc.logging.Formatter
public abstract class Formatter
Formats log records on behalf of logs the formatter is registered with.
Log,
LogController| Field Summary | |
|---|---|
protected static String |
EOL
|
| Constructor Summary | |
|---|---|
protected |
Formatter()
|
protected |
Formatter(FormatterType aType)
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compare to Formatter clasess. |
abstract String |
format(LogRecord rec)
Formats a log record which is then ready to be written to a log. |
String |
getFooter(Log log)
Returns the footer for a set of formatted records. |
String |
getFormatterName()
Gets the descriptive name for this formatter. |
FormatterType |
getFormatterType()
Returns the type of formatter instance. |
String |
getHeader(Log log)
Returns the header for a set of formatted records. |
protected com.sap.tc.logging.messagedepot.MessageAccessor |
getMessageAccessor()
Gets a MessageAccessor for this formatter. |
com.sap.tc.logging.interfaces.IMessageBuilder |
getMessageBuilder()
Returns the MsgByte object. |
boolean |
isCompleteMessage(int messageSize,
byte[] message,
int delimiterSize,
int[] delimiter)
Deprecated. Not Supported any more. |
boolean |
isCompleteMessage(String msg)
Determine if the message string reaches the valid end(delimiter) of a complete message record, according to the format defined by the formatter |
boolean |
isParsable()
Return true if this formatter supports message parsing formatted with this formatter. |
boolean |
isStartMessage(String msg)
Determine if the message string starts with the valid start(delimiter) of a message record, according to the format defined by the formatter |
boolean |
isStartMsg(int messageSize,
byte[] message)
Deprecated. Not Supported any more. |
LogRecord |
parseMsg(byte[] msgChunk)
|
LogRecord |
parseMsg(com.sap.tc.logging.interfaces.IMessageBuilder message)
|
LogRecord |
parseMsg(String completeMsgData)
Message written with the specific formatter is read as plain string. |
void |
setFormatterName(String name)
Sets a descriptive name for this formatter. |
void |
setMessageAccessor(com.sap.tc.logging.messagedepot.MessageAccessor accessor)
Sets a MessageAccessor for this formatter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String EOL
| Constructor Detail |
|---|
protected Formatter()
protected Formatter(FormatterType aType)
| Method Detail |
|---|
public abstract String format(LogRecord rec)
rec - Log record to be formatted
public com.sap.tc.logging.interfaces.IMessageBuilder getMessageBuilder()
public String getHeader(Log log)
log - Target log.
public String getFooter(Log log)
log - Target log
public void setMessageAccessor(com.sap.tc.logging.messagedepot.MessageAccessor accessor)
public String getFormatterName()
public void setFormatterName(String name)
public final FormatterType getFormatterType()
FormatterType for the predefined formatter types used in Logging.
public boolean isParsable()
parseMsg(String).
public LogRecord parseMsg(String completeMsgData)
throws ParseException
Message written with the specific formatter is read as plain string. This method parses the content and massages the data into appropriate fields, into a LogRecord structure.
NOTE: UPDATE this method when newer version of format is defined by the formatter.
A - complete message body and its admin data that can span across
multiple lines
LogRecord. Return Null if formatter does not support
parsing.
ParseException
public LogRecord parseMsg(byte[] msgChunk)
throws ParseException
ParseException
public LogRecord parseMsg(com.sap.tc.logging.interfaces.IMessageBuilder message)
throws ParseException
ParseExceptionpublic boolean isStartMessage(String msg)
public boolean isCompleteMessage(String msg)
public boolean equals(Object obj)
equals in class Objectprotected com.sap.tc.logging.messagedepot.MessageAccessor getMessageAccessor()
public boolean isStartMsg(int messageSize,
byte[] message)
public boolean isCompleteMessage(int messageSize,
byte[] message,
int delimiterSize,
int[] delimiter)
| Access Rights |
|---|
| SC | DC |
|---|---|
[sap.com] FRAMEWORK
|
[sap.com] tc/ddic/ddicruntime
|
[sap.com] ENGINEAPI
|
[sap.com] tc/logging
|
[sap.com] ENGFACADE
|
[sap.com] tc/bl/logging/api
|
[sap.com] CORE-TOOLS
|
[sap.com] com.sap.engine.client.lib
|
[sap.com] BRMS-FACADE
|
[sap.com] tc/brms/facade
|
|
SAP NetWeaver 7.20 (SP01) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||