com.ibm.commerce.ras
Class MethodLogEvent

java.lang.Object
  |
  +--com.ibm.commerce.ras.LogEvent
        |
        +--com.ibm.commerce.ras.MethodLogEvent
Direct Known Subclasses:
MethodEntryLogEvent, MethodExitLogEvent

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

MethodLogEvent class is used to format the message text for Tracing service.


Field Summary
protected  java.lang.String className
           
protected  java.lang.String clientId
           
protected  java.lang.String componentName
           
static java.lang.String COPYRIGHT
          IBM copyright notice field.
protected  java.lang.String message
           
protected  java.lang.String methodName
           
 
Constructor Summary
MethodLogEvent(java.sql.Timestamp time, java.lang.String thread, IOutputManager outputMgr, java.lang.String aClassName, java.lang.String aMethodName, java.lang.String text)
          Constructor for MethodLogEvent.
MethodLogEvent(java.sql.Timestamp time, java.lang.String thread, IOutputManager outputMgr, java.lang.String aComponentName, java.lang.String aClassName, java.lang.String aMethodName, java.lang.String text)
          Constructor for MethodLogEvent.
MethodLogEvent(java.sql.Timestamp time, java.lang.String thread, java.lang.String uniqueClientId, IOutputManager outputMgr, java.lang.String aClassName, java.lang.String aMethodName, java.lang.String text)
          Constructor for MethodLogEvent.
MethodLogEvent(java.sql.Timestamp time, java.lang.String thread, java.lang.String uniqueClientId, IOutputManager outputMgr, java.lang.String aComponentName, java.lang.String aClassName, java.lang.String aMethodName, java.lang.String text)
          Constructor for MethodLogEvent.
 
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()
          Gets the message body in compact format.
protected  java.lang.String getMessage()
          Retrieve the message text
 java.lang.String getMessageBody()
          Gets the message body in detailed format.
protected  boolean isCompactFormat()
          Check if the compact format is used
 void print()
          Print out the message text in specified output manager
 
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
IBM copyright notice field.
See Also:
Constant Field Values

componentName

protected java.lang.String componentName

className

protected java.lang.String className

clientId

protected java.lang.String clientId

methodName

protected java.lang.String methodName

message

protected java.lang.String message
Constructor Detail

MethodLogEvent

public MethodLogEvent(java.sql.Timestamp time,
                      java.lang.String thread,
IOutputManager outputMgr,
                      java.lang.String aClassName,
                      java.lang.String aMethodName,
                      java.lang.String text)
Constructor for MethodLogEvent.
Parameters:
time - the timestamp of the trace entry
thread - the thread that entry is generated by
outputMgr - output device to write the logs
aClassName - class name that generates the entry
aMethodName - method name that generates the entry
text - the plain text that will be shown in the log file

MethodLogEvent

public MethodLogEvent(java.sql.Timestamp time,
                      java.lang.String thread,
IOutputManager outputMgr,
                      java.lang.String aComponentName,
                      java.lang.String aClassName,
                      java.lang.String aMethodName,
                      java.lang.String text)
Constructor for MethodLogEvent.
Parameters:
time - the timestamp of the trace entry
thread - the thread that entry is generated by
outputMgr - output device to write the logs
aComponentName - trace component the entry belongs to
aClassName - class name that generates the entry
aMethodName - method name that generates the entry
text - the plain text that will be shown in the log file

MethodLogEvent

public MethodLogEvent(java.sql.Timestamp time,
                      java.lang.String thread,
                      java.lang.String uniqueClientId,
IOutputManager outputMgr,
                      java.lang.String aClassName,
                      java.lang.String aMethodName,
                      java.lang.String text)
Constructor for MethodLogEvent.
Parameters:
time - the timestamp of the trace entry
thread - the thread that entry is generated by
uniqueClientId - the unique Id to represent the client; used to debug double click problem
outputMgr - output device to write the logs
aClassName - class name that generates the entry
aMethodName - method name that generates the entry
text - the plain text that will be shown in the log file

MethodLogEvent

public MethodLogEvent(java.sql.Timestamp time,
                      java.lang.String thread,
                      java.lang.String uniqueClientId,
IOutputManager outputMgr,
                      java.lang.String aComponentName,
                      java.lang.String aClassName,
                      java.lang.String aMethodName,
                      java.lang.String text)
Constructor for MethodLogEvent.
Parameters:
time - the timestamp of the trace entry
thread - the thread that entry is generated by
uniqueClientId - the unique Id to represent the client; used to debug double click problem
outputMgr - output device to write the logs
aComponentName - trace component the entry belongs to
aClassName - class name that generates the entry
aMethodName - method name that generates the entry
text - the plain text that will be shown in the log file
Method Detail

createMessageBody

public java.lang.String createMessageBody()
Creates the message body. The message body can be in either detailed or compact format.
Specified by:
createMessageBody in class com.ibm.commerce.ras.LogEvent
Returns:
formatted message body

getCompactMessageBody

public java.lang.String getCompactMessageBody()
Gets the message body in compact format.
Returns:
the message text in compact format

getMessageBody

public java.lang.String getMessageBody()
Gets the message body in detailed format.
Returns:
the message text in detailed format

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