com.ibm.commerce.ras
Class MessageLogEvent

java.lang.Object
  |
  +--com.ibm.commerce.ras.LogEvent
        |
        +--com.ibm.commerce.ras.MessageLogEvent

public class MessageLogEvent
extends com.ibm.commerce.ras.LogEvent

MessageLogEvent class is used to format the message text for Logging and Tracing service. Each message contains two parts: header and body.


Field Summary
static java.lang.String COPYRIGHT
           
 
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)
          MessageLogEvent constructor.
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)
          MessageLogEvent constructor.
 
Method Summary
protected  java.lang.String createCompactMessageHeader()
          Create the message header in compact format
 java.lang.String createMessageBody()
          Create 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()
          Build the message body in compact format.
 java.lang.Throwable getException()
          Get 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()
          Build 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)
          Set the exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Constructor Detail

MessageLogEvent

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)
MessageLogEvent constructor.

MessageLogEvent

public 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)
MessageLogEvent constructor.
Method Detail

createMessageBody

public java.lang.String createMessageBody()
Create the message body.
Overrides:
createMessageBody in class com.ibm.commerce.ras.LogEvent

getCompactMessageBody

public java.lang.String getCompactMessageBody()
Build the message body in compact format.

getException

public java.lang.Throwable getException()
Get the exception of the message.

getExceptionStackTrace

protected static java.lang.String getExceptionStackTrace(java.lang.Throwable e)
Get the stack trace from an exception.
Parameters:
e - Throwable

getMessageBody

public java.lang.String getMessageBody()
Build the message body.

setException

public void setException(java.lang.Throwable newException)
Set the exception.
Parameters:
newException - java.lang.Throwable

createCompactMessageHeader

protected java.lang.String createCompactMessageHeader()
Create the message header in compact format

createMessageFooter

protected java.lang.String createMessageFooter()
Create the message footer

createMessageHeader

protected java.lang.String createMessageHeader()
Create the message header

doCreateHeaderExtention

protected java.lang.String doCreateHeaderExtention()
Create header extention

getMessage

protected java.lang.String getMessage()
Retrieve the message text

isCompactFormat

protected boolean isCompactFormat()
Check if the compact format is used

print

public void print()
Print out the message text in specified output manager