|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rational.artifact.api.logging.LoggingUtilities
LoggingUtilities
is a class of static methods for logging information to the ClearQuest
log files and optionally the Eclipse console. Constants in this class describe what type of action
triggered the log event and where the messages should be logged.
The following code fragment logs a success message to both the console and ClearQuest log files after
updating a record:
LoggingUtilities.fireMessageEvent(LoggingUtilities.COMMAND_TYPE_ACTION, "The record has been successfully updated.", LoggingUtilities.LOGGING_OPTION_CONSOLE_AND_LOG_FILES, "admin,7.0.0@SAMPL", "Defect", "SAMPL000001");
Field Summary | |
---|---|
static int |
COMMAND_TYPE_ACTION
An action on a record is being logged. |
static int |
COMMAND_TYPE_CREATOR
A new record is being logged. |
static int |
COMMAND_TYPE_LOGIN
A new connection is being logged. |
static int |
COMMAND_TYPE_LOGOUT
A disconnect is being logged. |
static int |
COMMAND_TYPE_OTHER
Some other event is being logged. |
static int |
COMMAND_TYPE_QUERY_RESOURCE
A query is being logged. |
static int |
COMMAND_TYPE_SESSION_EXPIRED
An expired session is being logged. |
static int |
COMMAND_TYPE_SESSION_RESTORED
A restored session is being logged. |
static int |
LOGGING_OPTION_CONSOLE_AND_LOG_FILES
LOGGING_OPTION_CONSOLE_AND_LOG_FILES works in the following manner:
If an Exception event, then it logs the exception in the console view,
Eclipse log file and ClearQuest Logger file. |
static int |
LOGGING_OPTION_DEFAULT
LOGGING_OPTION_DEFAULT works in the following manner:
If an Exception event, then it logs the exception in the console view,
Eclipse log file, ClearQuest Logger file and also displays a dialog to the user
with the message from the exception. |
static int |
LOGGING_OPTION_LOG_FILES_ONLY
LOGGING_OPTION_LOG_FILES_ONLY works in the following manner:
If an Exception event, then it logs the exception to Eclipse log file
and ClearQuest Logger file
If Error event, then it logs the the error to CM Logger file. |
Constructor Summary | |
---|---|
LoggingUtilities()
|
Method Summary | |
---|---|
static void |
fireErrorEvent(int commandType,
java.lang.String commandName,
java.lang.String errorMessage)
Logs an error using LOGGING_OPTION_DEFAULT . |
static void |
fireErrorEvent(int commandType,
java.lang.String commandName,
java.lang.String errorMessage,
int loggingOption)
Logs an error. |
static void |
fireErrorEvent(int commandType,
java.lang.String commandName,
java.lang.String errorMessage,
int loggingOption,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs an Error |
static void |
fireErrorEvent(int commandType,
java.lang.String commandName,
java.lang.String errorMessage,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs an error using LOGGING_OPTION_DEFAULT . |
static void |
fireExceptionEvent(int commandType,
java.lang.String commandName,
java.lang.Throwable throwable)
Logs an exception using LOGGING_OPTION_DEFAULT . |
static void |
fireExceptionEvent(int commandType,
java.lang.String commandName,
java.lang.Throwable throwable,
int loggingOption)
Logs an exception. |
static void |
fireExceptionEvent(int commandType,
java.lang.String commandName,
java.lang.Throwable throwable,
int loggingOption,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs an exception. |
static void |
fireExceptionEvent(int commandType,
java.lang.String commandName,
java.lang.Throwable throwable,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs an exception using LOGGING_OPTION_DEFAULT . |
static void |
fireMessageEvent(int commandType,
java.lang.String commandName,
java.lang.String message)
Logs a message event using LOGGING_OPTION_DEFAULT . |
static void |
fireMessageEvent(int commandType,
java.lang.String commandName,
java.lang.String message,
int loggingOption)
Logs a message. |
static void |
fireMessageEvent(int commandType,
java.lang.String commandName,
java.lang.String message,
int loggingOption,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs a message. |
static void |
fireMessageEvent(int commandType,
java.lang.String commandName,
java.lang.String message,
java.lang.String providerLocationInfo,
java.lang.String recordType,
java.lang.String recordID)
Logs a message using LOGGING_OPTION_DEFAULT . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int COMMAND_TYPE_ACTION
public static final int COMMAND_TYPE_QUERY_RESOURCE
public static final int COMMAND_TYPE_LOGIN
public static final int COMMAND_TYPE_LOGOUT
public static final int COMMAND_TYPE_CREATOR
public static final int COMMAND_TYPE_SESSION_EXPIRED
public static final int COMMAND_TYPE_SESSION_RESTORED
public static final int COMMAND_TYPE_OTHER
public static final int LOGGING_OPTION_DEFAULT
LOGGING_OPTION_DEFAULT
works in the following manner:
public static final int LOGGING_OPTION_LOG_FILES_ONLY
LOGGING_OPTION_LOG_FILES_ONLY
works in the following manner:
public static final int LOGGING_OPTION_CONSOLE_AND_LOG_FILES
LOGGING_OPTION_CONSOLE_AND_LOG_FILES
works in the following manner:
Constructor Detail |
public LoggingUtilities()
Method Detail |
public static void fireExceptionEvent(int commandType, java.lang.String commandName, java.lang.Throwable throwable)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that resulted in the exceptionthrowable
- the exception to logpublic static void fireErrorEvent(int commandType, java.lang.String commandName, java.lang.String errorMessage)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that resulted in the errorerrorMessage
- the error message to logpublic static void fireMessageEvent(int commandType, java.lang.String commandName, java.lang.String message)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that triggered this messagemessage
- the message to logpublic static void fireExceptionEvent(int commandType, java.lang.String commandName, java.lang.Throwable throwable, int loggingOption)
commandType
- the constant for the type of command that resulted in the exceptionthrowable
- the exception to logloggingOption
- the constant describing where to log this exceptionpublic static void fireErrorEvent(int commandType, java.lang.String commandName, java.lang.String errorMessage, int loggingOption)
commandType
- the constant for the type of command that resulted in the errorerrorMessage
- the error message to logloggingOption
- the constant describing where to log this errorpublic static void fireMessageEvent(int commandType, java.lang.String commandName, java.lang.String message, int loggingOption)
commandType
- the constant for the type of command that triggered this messagemessage
- the message to logloggingOption
- the constant describing where to log this messagepublic static void fireExceptionEvent(int commandType, java.lang.String commandName, java.lang.Throwable throwable, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that triggered this exceptionthrowable
- the exception to logproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the databasepublic static void fireErrorEvent(int commandType, java.lang.String commandName, java.lang.String errorMessage, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that triggered this exceptionerrorMessage
- the error message to logproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the databasepublic static void fireMessageEvent(int commandType, java.lang.String commandName, java.lang.String message, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
LOGGING_OPTION_DEFAULT
.
commandType
- the constant for the type of command that triggered this exceptionmessage
- the message to logproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the databasepublic static void fireExceptionEvent(int commandType, java.lang.String commandName, java.lang.Throwable throwable, int loggingOption, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
commandType
- the constant for the type of command that triggered this exceptionthrowable
- the exception to logloggingOption
- where to log the exceptionproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the databasepublic static void fireErrorEvent(int commandType, java.lang.String commandName, java.lang.String errorMessage, int loggingOption, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
commandType
- the constant for the type of command that triggered this exceptionerrorMessage
- the error message to logloggingOption
- where to log the error messageproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the databasepublic static void fireMessageEvent(int commandType, java.lang.String commandName, java.lang.String message, int loggingOption, java.lang.String providerLocationInfo, java.lang.String recordType, java.lang.String recordID)
commandType
- the constant for the type of command that triggered this exceptionmessage
- the message to logloggingOption
- where to log the messageproviderLocationInfo
- the location of the record. Must be specified in this format:
<username>,<db_set_name>@<database_name>
(for example, admin,7.0.0@SAMPL
)recordType
- the record type in the databaserecordID
- the record ID in the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |