|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.beans.util.CMBTraceLog
The CMBTraceLog utility bean handles trace events generated by other beans. The user of the bean can configure the handling of trace messages at each level individually. For each level, trace messages can be:
Summary of properties and events:
imported properties GUI look and feel style, use default GUI literal, will not veto exported properties none standalone properties window title, mute when trace message displayed, message display mode, display enabled for each level, log enalbed for each level, and button labels interested in events CMBTraceEvent - to service trace PropertyChangeEvent - to import traceEnabled source of events none
CMBTraceEvent
, Serialized FormField Summary | |
static int |
CMB_LOG_DEBUG
|
static int |
CMB_LOG_ERROR
|
static int |
CMB_LOG_TRACE
|
static java.lang.String |
LOG_FILE_NAME
The default trace log file name. |
Constructor Summary | |
CMBTraceLog()
Constructor. |
Method Summary | |
boolean |
closeLogFile()
Write the closing messages and close the log file with a timestamp. |
void |
finalize()
Destructor, close the log file, dispose the window. |
java.lang.String |
getClearLabel()
Get clear button label. |
java.lang.String |
getCloseLabel()
Get close button label. |
int |
getDisplayMode()
Get message display mode property. |
java.lang.String |
getLogFullpath()
Get the log file fullpath property. |
java.lang.String |
getLogSessionEpilogue()
Get the log session ending message property. |
java.lang.String |
getLogSessionPrologue()
Get the log session starting message property. |
java.lang.String |
getMuteLabel()
Get mute checkbox label. |
int |
getPriority()
returns logging priority |
java.awt.Component |
getRootNode()
Get the window frame, may be used for updating GUI look and feel style. |
java.lang.String |
getWindowTitle()
Get window title. |
boolean |
isDebugDisplayEnabled()
Get display enabled option for debugging message. |
boolean |
isDebugLogEnabled()
Get log enabled option for debugging messages. |
boolean |
isDefaultGuiLiteral()
Get use default GUI literal property value. |
boolean |
isErrorDisplayEnabled()
Get display enabled option for error information. |
boolean |
isErrorLogEnabled()
Get log enabled option for error information. |
boolean |
isMute()
Get mute when display messages property value. |
boolean |
isProgressDisplayEnabled()
Get display enabled option for progress information. |
boolean |
isProgressLogEnabled()
Get log enabled option for progress information. |
boolean |
isVisible()
Query if the trace console is visiable. |
boolean |
logMessage(java.lang.String message)
Log the trace messages. |
void |
onCMBTrace(CMBTraceEvent evt)
When a MessageEvent received, this is the method that gets called. |
boolean |
openLogFile()
Open the log file and write starting messages with a timestamp for each application session. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
PropertyChangeEvent service routine, to import the "GUI look and feel" and "use default GUI literal" property values. |
void |
setClearLabel(java.lang.String newValue)
Set clear button label. |
void |
setCloseLabel(java.lang.String newValue)
Set close button label. |
void |
setDebugDisplayEnabled(boolean newValue)
Set display enabled option for debugging message. |
void |
setDebugLogEnabled(boolean newValue)
Set log enabled option for debugging messages. |
void |
setDefaultGuiLiteral(boolean newValue)
When turned on, all the GUI literal will be re-loaded from the resource file. |
void |
setDisplayMode(int newValue)
Set message display mode property. |
void |
setErrorDisplayEnabled(boolean newValue)
Set display enabled option for error information. |
void |
setErrorLogEnabled(boolean newValue)
Set log enabled option for error information. |
void |
setLogFullpath(java.lang.String newValue)
Set the log file fullpath property. |
void |
setLogSessionEpilogue(java.lang.String newValue)
Set the log session ending message property. |
void |
setLogSessionPrologue(java.lang.String newValue)
set the log session starting message property. |
void |
setMute(boolean newValue)
Set mute property. |
void |
setMuteLabel(java.lang.String newValue)
Set mute checkbox label. |
void |
setPriority(int priority)
sets logging priority log level supported: CMB_LOG_ERROR, CMB_LOG_TRACE, CMB_LOG_DEBUG |
void |
setProgressDisplayEnabled(boolean newValue)
Set display enabled option for progress information. |
void |
setProgressLogEnabled(boolean newValue)
Set log enabled option for progress information. |
void |
setVisible(boolean visible)
Show or hide the trace console. |
void |
setWindowTitle(java.lang.String newValue)
Set window title. |
void |
showMessage(java.lang.String message)
Display the trace messages, in the way specified in the display mode property. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOG_FILE_NAME
public static final int CMB_LOG_TRACE
public static final int CMB_LOG_DEBUG
public static final int CMB_LOG_ERROR
Constructor Detail |
public CMBTraceLog()
Method Detail |
public void finalize()
finalize
in class java.lang.Object
public void onCMBTrace(CMBTraceEvent evt)
onCMBTrace
in interface CMBTraceListener
evt
- a message eventpublic void setPriority(int priority)
priority
- the logging prioritypublic int getPriority()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- a prpoerty changed eventpublic java.lang.String getLogSessionPrologue()
public void setLogSessionPrologue(java.lang.String newValue)
newValue
- new log session starting messagepublic java.lang.String getLogSessionEpilogue()
public void setLogSessionEpilogue(java.lang.String newValue)
newValue
- new log session ending messagepublic java.lang.String getLogFullpath()
public void setLogFullpath(java.lang.String newValue)
newValue
- the new log file name with fullpathpublic boolean isProgressLogEnabled()
public void setProgressLogEnabled(boolean newValue)
newValue
- new progress information log option valuepublic boolean isDebugLogEnabled()
public void setDebugLogEnabled(boolean newValue)
newValue
- new debug message log option valuepublic boolean isErrorLogEnabled()
public void setErrorLogEnabled(boolean newValue)
newValue
- new error information log option valuepublic boolean isProgressDisplayEnabled()
public void setProgressDisplayEnabled(boolean newValue)
newValue
- new progress information visually display option valuepublic boolean isDebugDisplayEnabled()
public void setDebugDisplayEnabled(boolean newValue)
newValue
- new debug message visually display option valuepublic boolean isErrorDisplayEnabled()
public void setErrorDisplayEnabled(boolean newValue)
newValue
- new error information visually display option valuepublic int getDisplayMode()
public void setDisplayMode(int newValue)
DISPLAY_MESSAGE_ON_STDERR
or
DISPLAY_MESSAGE_ON_STDOUT
or
DISPLAY_MESSAGE_IN_WINDOW
This method also show/hide the window accordingly.newValue
- new message display modepublic boolean isDefaultGuiLiteral()
public void setDefaultGuiLiteral(boolean newValue)
newValue
- new use default GUI literal optionpublic java.lang.String getWindowTitle()
public void setWindowTitle(java.lang.String newValue)
newValue
- new window titlepublic boolean isMute()
public void setMute(boolean newValue)
newValue
- new mute setting valuepublic java.lang.String getCloseLabel()
public void setCloseLabel(java.lang.String newValue)
newValue
- new close button labelpublic java.lang.String getMuteLabel()
public void setMuteLabel(java.lang.String newValue)
newValue
- new mute checkbox labelpublic java.lang.String getClearLabel()
public void setClearLabel(java.lang.String newValue)
newValue
- new clear button labelpublic boolean openLogFile()
public boolean logMessage(java.lang.String message)
message
- the message to recordpublic boolean closeLogFile()
public void showMessage(java.lang.String message)
message
- the message text stringpublic void setVisible(boolean visible)
DISPLAY_MESSAGE_IN_WINDOW.
- Parameters:
visible
- true or false
public boolean isVisible()
true or false
public java.awt.Component getRootNode()
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |