java.lang.Object | +--com.ibm.commerce.ras.LogEvent | +--com.ibm.commerce.ras.MessageLogEvent
MessageLogEvent class is used to format the message text for message loggin service. Each message contains two parts: header and body.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Constructor Summary | |
---|---|
MessageLogEvent(java.sql.Timestamp time, java.lang.String threadName,
IOutputManager outputMgr,
ECMessage msg,
java.lang.String clsName, java.lang.String mtdName,
java.lang.Object[] params) Constructor for MessageLogEvent. | |
MessageLogEvent(java.sql.Timestamp time, java.lang.String threadName,
java.lang.String uniqueClientId,
IOutputManager outputMgr,
ECMessage msg,
java.lang.String clsName, java.lang.String mtdName,
java.lang.Object[] params) Constructor for MessageLogEvent. |
Method Summary | |
---|---|
protected
java.lang.String |
createCompactMessageHeader() Create the message header in compact format |
java.lang.String |
createMessageBody() Creates the message body. |
protected
java.lang.String |
createMessageFooter() Create the message footer |
protected
java.lang.String |
createMessageHeader() Create the message header |
protected
java.lang.String |
doCreateHeaderExtention() Create header extention |
java.lang.String |
getCompactMessageBody() Builds the message body in compact format. |
java.lang.Throwable |
getException() Gets the exception of the message. |
protected
static java.lang.String |
getExceptionStackTrace(java.lang.Throwable e) Get the stack trace from an exception. |
protected
java.lang.String |
getMessage() Retrieve the message text |
java.lang.String |
getMessageBody() Builds the message body. |
protected
boolean |
isCompactFormat() Check if the compact format is used |
void |
print() Print out the message text in specified output manager |
void |
setException(java.lang.Throwable newException) Sets the exception. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public MessageLogEvent(java.sql.Timestamp time, java.lang.String threadName, IOutputManager outputMgr, ECMessage msg, java.lang.String clsName, java.lang.String mtdName, java.lang.Object[] params)
time
- the timestamp of the log entrythreadName
- the thread that message is generated byoutputMgr
- output device to write the logsmsg
- the message objectclsName
- class name that generates the messagemtdName
- method name that generates the messageparams
- the list of parameters that will be substituted into
the message textpublic MessageLogEvent(java.sql.Timestamp time, java.lang.String threadName, java.lang.String uniqueClientId, IOutputManager outputMgr, ECMessage msg, java.lang.String clsName, java.lang.String mtdName, java.lang.Object[] params)
time
- the timestamp of the log entrythreadName
- the thread that message is generated byuniqueClientId
- the unique Id to represent the client; used
to debug double click problemoutputMgr
- output device to write the logsmsg
- the message objectclsName
- class name that generates the messagemtdName
- method name that generates the messageparams
- the list of parameters that will be substituted into
the message textMethod Detail |
---|
public java.lang.String createMessageBody()
createMessageBody
in class
com.ibm.commerce.ras.LogEvent
public java.lang.String getCompactMessageBody()
public java.lang.Throwable getException()
protected static java.lang.String getExceptionStackTrace(java.lang.Throwable e)
e
- exception stack trace associated to the
messagepublic java.lang.String getMessageBody()
public void setException(java.lang.Throwable newException)
newException
- exception object associated to the
messageprotected java.lang.String createCompactMessageHeader()
protected java.lang.String createMessageFooter()
protected java.lang.String createMessageHeader()
protected java.lang.String doCreateHeaderExtention()
protected java.lang.String getMessage()
protected boolean isCompactFormat()
public void print()