com.ibm.rational.rpe.common.log
Class RPELog

java.lang.Object
  extended by com.ibm.rational.rpe.common.log.RPELog

public class RPELog
extends java.lang.Object

Provides an abstraction to logging abilities in RPE. There is a single instance of RPELog per application. This is an internal class. Do not use directly. Use the IRPELogger obtained from AppUtils.getLogger() for logging purposes.


Nested Class Summary
static class RPELog.Level
          The various severities of log messages
 
Method Summary
static RPELog getInstance()
          Access to the singleton object
 java.lang.String getMessage(com.ibm.rational.rpe.common.log.IMessages messages, java.lang.String id, java.lang.String[] argvs)
          Gives the message for the error ID minus the CRRPE prefix and ID
 java.lang.String getMessageForUI(java.lang.String id, java.lang.String[] argvs, java.lang.Throwable t, com.ibm.rational.rpe.common.log.IMessages messages)
          Returns a message in the form of: CRRPE+id+severity+message
 void logMessage(java.lang.String id, java.lang.String[] argvs, java.lang.Throwable t)
          Logs an RPE message by using the log system in the application.
 void logMessage(java.lang.String id, java.lang.String[] argvs, java.lang.Throwable t, com.ibm.rational.rpe.common.log.IRPELogFilter filter, boolean compareContent)
          Builds and logs the message from the provided components
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RPELog getInstance()
Access to the singleton object


logMessage

public void logMessage(java.lang.String id,
                       java.lang.String[] argvs,
                       java.lang.Throwable t,
                       com.ibm.rational.rpe.common.log.IRPELogFilter filter,
                       boolean compareContent)
Builds and logs the message from the provided components

Parameters:
id - - the ID of the message. This is an internal ID and not a string table id
argvs - - optional arguments as required by each message (optional)
t - - the exception to log (optional)
filter - - a filter to use when logging the message. An example of a useful filter is one that avoids duplicated error messages
compareContent - - an argument for the log filter

logMessage

public void logMessage(java.lang.String id,
                       java.lang.String[] argvs,
                       java.lang.Throwable t)
Logs an RPE message by using the log system in the application. This is a shortcut for logMessage(id, argvs, t, null, false)


getMessage

public java.lang.String getMessage(com.ibm.rational.rpe.common.log.IMessages messages,
                                   java.lang.String id,
                                   java.lang.String[] argvs)
Gives the message for the error ID minus the CRRPE prefix and ID

Parameters:
messages -
id -
argvs -
Returns:

getMessageForUI

public java.lang.String getMessageForUI(java.lang.String id,
                                        java.lang.String[] argvs,
                                        java.lang.Throwable t,
                                        com.ibm.rational.rpe.common.log.IMessages messages)
Returns a message in the form of: CRRPE+id+severity+message